I have a very easy request, can someone please provide the attribute that enables sorting in a column? I have two grids, one of them sorts ascending/descending when you click on each of it's column headers and one does not. I built both of them, but for some reason I cannot find why one works and one doesn't. I assume it's built in by nature and for the one that isn't functioning, somehow I must have disabled but I cannot locate it. So again, if someone can just provide the attribute the enables sorting, I would greatly appreciate it.
Sorting is turned on by default. If you have turned it off somehow, if should be from the LabelClickAction property or probably you have handled some event, for example PreviewMouseLeftButtonDown
Thank you for the response. Could you please be more specific as to perhaps re-establish the default as you pointed out by the
"LabelClickAction" prop. I've reviewed both the one not working and my other, and i can't find any
differences that would cause this. Also, when you say handled some event. Do you mean in the
code behind that maybe this is being overridden? Any further help would be greatly appreciated.
The property could be set on the FieldSettings object of the XamDataGrid:
XamDataGrid.FieldSettings.LabelClickAction, or it could be set for a specific field
XamDataGrid.FieldLayouts[0].Fields[0].Settings.LabelClickAction.
If the event PreviewMouseLeftButtonDown was handled in code behind, then you would lose almost all of the interactivity with the grid. Are the two XDGs bound to the same data source? Can you provide a small sample that we can take a look at?