I need to deselect only one cell once selected.
I have tried the following code in the SelectionChanged and SelectionChanging events. But it does not work.
RadGridView1.CurrentCell.IsSelected = false
2 Answers, 1 is accepted
Dess | Tech Support Engineer, Principal
answered on 05 Sep 2018, 09:36 AM
The SelectionChanging event is fired before actually the selected row is changed. You can cancel this event in order to prevent the row specified in the event arguments to be selected. Simply set the Cancel argument to true.
I am not sure why exactly you try to unselect a cell in the SelectionChanged event. However, have in mind that if you manipulate the IsSelected property in this event it will be triggered again. I can suggest you to cancel the SelectionChanging event when you try to prevent a certain cell to be selected you unselect the cell programmatically on a button click. If you are still experiencing any further difficulties, it would be greatly appreciated if you can provide additional information about the exact goal that you are trying to achieve. Thus, we would be able to think about a suitable solution.
I hope this information helps. If you have any additional questions, please let me know.
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.