It appears the DataPresenters sorted event is not raised when the sort is programmatically changed.
When using a datagrid, and the headers are clicked the event is firing correctly for me, but when I apply a sort programmatically by calling the following code, the data will sort, but the event does not fire. Is this desired behavior? It seems to be the sorted event should be called in this scenario. Is there something I am doing wrong?
dataPresenterObject.DefaultFieldLayout.SortedFields.Clear();
dataPresenterObject.DefaultFieldLayout.SortedFields.Add(fieldSortDescriptionObject);
Hi,
That is the expected behavior. The documentation for the Sorted event says:
"Occurs when the sort order of records has changed as the result of a user action."
Josh