Hi,
I'm sure this must be referenced somwhere but I just can't find it...
How can you make it so that when the user clicks a column header in the grid the column sorts and the column is selected - so they might be able to subsequently hide it, etc.
Thanks for any information.
There's no built-in way to do both. What I would do is set the HeaderClickAction to either sort or select. Then in the appropriate event, I would add in the second operation. For example, you could set the HeaderClickAction to Sort, and then in the AfterSortChange event of the grid, you could select the column that was sorted.
Yes, I've been trying that, but can't get the Selection to work. Using .SortedColumns property of e in BeforeSortChange (AfterSortChange has no obvious way to get to the column that was sorted)
e.SortedColumns[0].Header.Selected = true; //doesn't workthis.ultraGridPlans.Selected.Columns.Add(e.SortedColumns[0].Header); //doesn't work either
Do you know of any code that does?
Thanks