SitePen / dgrid

A lightweight, mobile-ready, data-driven, modular grid widget designed for use with dstore
http://dgrid.io/
Other
628 stars 295 forks source link

sorting store to scroll to selected store #1292

Open rpadmaja opened 8 years ago

rpadmaja commented 8 years ago

I am trying to scroll to selected row using onDemandGrid. I have a dgrid table which renders using default sort order value. I am trying to reorder the store using this sort order value, to estimate the index of selected result and scroll to that position. But i am wondering how i could sort the store based of dgrid sort order. I tried the below, but it always sorts in desc order instead of default sort order and gives the wrong estimate of index value var sortedStore = this.dgridTable.store.query({}, {sort: this.dgridTable.get("sort")});

What could be the issue with above approach. Is there any robust way of performing the scrolling to selected row