This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
We have noticed that in our application when the user sorts by a DataGrid column by clicking the header (ascending or descending), then switches to another tab (DataGrid is unloaded), then switches back (DataGrid is reloaded), the column header will still indicate that the column is sorted, but actually the DataGrid will be back to the original order (unsorted). I have tested this with the latest nightly build (V7). I was able to resolve this by making some simple changes in DataGrid.cs as follows:
if (savedSortColumn != null) { Dispatcher.BeginInvoke(new UpdateSortDelegate(UpdateSort), savedSortColumn); } I don't know if this is the best fix. Peter |
|
|
Hi Peter, Thanks for contacting us about this. I've resolved this issue for the next nightly build. As you have seen, the sorted column still indicates that it is sorted when reloading the control. This is persisted in the DataGridColumn model. So, rather than storing the saved column in a new field, the unloaded method can find which column (if any) is sorted. I also perform the sort directly, rather than through the dispatcher - otherwise there is a noticeable change when the sort is applied. Let me know if you have any questions about this. -Jason Fauchelle |
|