Hello Hu,
RadGridView offers SelectionMode property that controls whether and how the cell in the grid can be selected. GridViewSelectionMode can be CellSelect, FullRowSelect or None. More information is available here. Following your requirement, you would like to disable selection only for the end-users but still be able to select programmatically.
You can achieve this behavior by handling the SelectionChanging event which allows you to be canceled. Thus, you can raise a flag of boolean type and manage the selection in the grid as per your requirement. I created a sample project for your reference where selection is disabled when the raised flag is true and enabled when the flag is false ( for example when selecting a row programmatically on a button_Click event )
I hope this helps. Let me know if you have other questions.
Regards,
Nadya
Progress Telerik
Progress is here for your business, like always.
Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.