2 Answers, 1 is accepted
We have a great demo on setting up the "Column Selection" which you can find in our SDK Sample Browser. You can download it from http://demos.telerik.com/xaml-sdkbrowser/. Once you have it installed you need to navigate to the GridView control and check the "Column Selection" example.
I have attached a sample project as well that implements the needed behavior. Please, review it and update me if it was useful.
Regards,
Stefan Nenchev
Telerik
Hello Stefan Nenchev,
For my project I have used the above code RadGridView-WPF-NoXAML-20.zip
About this code the handler is applied for all the cells in the grid.
But for me I need to handle this only when clicking the header cell of grid, because we are using converter, selection changed
event for rows of grid which is not working because of this common handler event
Thanks in advance
@Stenly,
In the "Column Selection" SDK example, the logic in the event handler for the MouseLeftButtonDown event will select the cells only if the clicked element is of the type GridViewHeaderCell. May I ask if you could share a bit more information on the scenario present on your end?
> Yes you are correct. In SDK example during click action in the grid OnMouseLeftButtonDown method is called and this method is differentiating the header cell or row cell.
But I want the event handler to apply only for GridViewHeaderCell, If I click header cell OnMouseLeftButtonDown should be called and not for other cells.
Because In my project I am having both selection change event handler for Enum Combobox and function to edit the row cells when click action is done. So when I used the SDK example the above selection change event handler and cell edit is not working for me.
Hello Monica,
To avoid any misunderstandings, would you find it possible to demonstrate your setup and requirement in the sample project that my colleague Stefan provided?
This will help me in finding a viable solution for your particular scenario. Thank you in advance for your cooperation on the matter.
Hello Dilyan,
This issue was because of our code and we fixed it, thank you for your support