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
|
If I have a DataGrid (latest WPF Elements 6 nightly build) that is sorted by a column (arrow appears at top of header) and then do something that results in the ItemsSource being updated, the sorting is not applied to the new list of items, yet the column header still indicates that the column is sorted. This is confusing to users. Maybe I can figure out how to fix this myself, but is seems like this is something the DataGrid should handle automatically. I think that when the ItemsSource is changed either the current sort should be applied to the new items, or the sort indicator should be removed. Can this be done? I could send a demo project, but I doubt you need it--let me know. Thanks |
|
|
Hello Peter I have not been able to reproduce this yet. The current behavior is to unsort all columns when a new item is added. It could be that a particular DataGrid setup is going undetected by this logic, such as a certain type of data structure, combined with the use of hierarchical data or some other feature related to displaying the list of items. Please describe your DataGrid setup, or send a repro project and I'll see what we can do about fixing this. -Jason Fauchelle |
|
|
Hi Jason, Thanks for your quick reply. The issue I am having in not with adding an item to the ItemsSource--it is with assigning a new ItemsSource. Below is a simple demo. To see the problem run the demo, click on the FirstName or LastName column to sort, click the Switch Items button, observe that the updated list of items is not sorted, but the column header still indicates that it is sorted.
C# code:
|
|
|
Hello Peter Thanks for the clarification and sample code. This bug will be resolved in the next nightly build - the column headers will no longer show that they are sorted. -Jason Fauchelle |
|
|
Hi Jason, Thanks for the fix. Peter |
|