foralobo
foralobo

Reputation: 3957

Dgrid sorted but not sorted in the store?

when I sort the dgrid, clicking on some column header, the view of the grid changes. When for example I call "getSelectedRows" on the grid object, I get the list of selected rows but not sorted. I need to get on the js, the list of sorted rows because I must print them in a pdf in the same sorting that the grid views the results. Is there in dgrid a function, an object or something else to permit me to get this result? Thank you very much!!!!!

Upvotes: 0

Views: 180

Answers (1)

Shahzad
Shahzad

Reputation: 620

It depends on which version of dgrid you are using, if you are using dgrid 0.3 you can get rendered data of grid like this from it's store

var sortedData=grid.store.query(grid.get('query'),{sort:grid.get('sort')});

in dgrid 0.4 you can just use_renderedCollection property of dgrid

Upvotes: 2

Related Questions