Is it possible to restrict DataGrid sorting to limited columns? For example, If I have columns 1, 2 and 3. I only want data to sort when user clicks header of column 1 and 2 and nothing should happen when header of column 3 is clicked.
Also how can I get the information which column is currently sorted.
Thanks
+1 from me for the question even though it is probably a duplicate.
Every DataGrid column allows to specify if user shall be able to sort the column.
Take a look at this link.
Now in order to disable sorting just set DataGridColumn.CanUserSort to false.