I know how to detect if a user has clicked on a column header, using a hittest. What I want to know is how to SIMULATE programically as if a user has clicked on a column header. Is this possible?
Let me clarify why I want to be able to do this. I am making my own variation of the datagrid. I am trying to make a property for MY datagrid that allows you to know which column the datagrid is currently sorted by and which way (Asc or Dsc). Remember the user can hit a column header to resort the grid. Are there any properties that allow you to figure this out with the default datagrid?
You don't simulate the clicking of the header. Instead you create a property that remembers for you. This property is then updated when the user clicks a header, or when your program changes the sorting.
So pogram it that way. There's nothing stopping you from taking the same code that sorts the data when a header is clicked and using it when that property is set.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.