[DevExpress Support Team: CLONED FROM Q570580: CheckBoxRowSelect - Selection is cleared when you click outside of a check box column]
My Issue is not related to code mentioned above. I am trying to bind simple datatable with two data columns. Once the datasource is set and binded to grid. I am trying to set below two properties
gridViewAdresses.OptionsSelection.MultiSelect = true;
this.gridViewAdresses.OptionsSelection.MultiSelectMode =DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect;
Here I am able to see the checkbox as first column along with other two datacolumns of datasource. But my concern at any point of time I am able to check only one datarow checkbox. By selecting the control I can can select multi rows checkboxes. But I do not want to have that way. I should be able to persist the previous checked checkbox state when I select other row checkbox.
How to prevent multi row selection when the CheckBoxRowSelect option is used
Answers approved by DevExpress Support
Hello,
To accomplish this task, you can handle the GridView.SelectionChanged event and reset the selection from the previous row. I have created a project to illustrate this approach.
Please try the attached project and let us know if it works for you.
I am looking forward to your response.