var record = this.grd_WatchList.Model.View.Records;
ObservableCollection <InstrumentEntry> sortedCollection = record as ObservableCollection<InstrumentEntry>;
Hi,
In this code, although record has sorted data value, sortedCollection becomes null.
how can i do to get data value at sortedCollection
Thanks and Best Regards
Hi Shwe,
Thanks for your update.
We have analyzed your query and you can get the sorted collection from the View by using the following code snippet
Code snippet[C#]:
|
this.syncgrid.Model.Table.SortColumnsChanged += new GridDataSortColumnsChangedEventHandler(Table_SortColumnsChanged); void Table_SortColumnsChanged(object sender, GridDataSortColumnsChangedEventArgs args) { this.Dispatcher.BeginInvoke(new Action(() => { var records = this.syncgrid.Model.View.Records; var SortedCollection = records as EnumerableRecordsWrapper; if (SortedCollection != null) { // we can access the sorted record here. } }), DispatcherPriority.ApplicationIdle); } |
Please let us know if you have any queries.
Regards,
Gobinath A.