No , I am using the GridCheckBoxColumn and it still selects/deselects the row..
Hi Vicky,
We have checked the requirement. You can restrict the selection when clicking the checkbox using the following code snippet.
|
this.sfdatagrid.CurrentCellActivating += Sfdatagrid_CurrentCellActivating;
private void Sfdatagrid_CurrentCellActivating(object sender, CurrentCellActivatingEventArgs e) { var columnIndex = this.sfdatagrid.ResolveToGridVisibleColumnIndex(e.CurrentRowColumnIndex.ColumnIndex); var columnName = this.sfdatagrid.Columns[columnIndex].MappingName;
if(columnName == "IsChecked") { e.Cancel = true; } } |
https://www.syncfusion.com/downloads/support/forum/173505/ze/CS935053927
Please refer the sample from the above link and let us know if you have any concerns.
Regards,
Sampath Narayanan.S
That would help , but still have some problems..
Instead of that , is there a way , so that when clicking the same checkbox repeatedly, instead of having the row always deselected , it stays selected ? So , I click the checkbox on a new row , it marks the change in the checkbox , selects the row , and if I click again on the same checkbox , the row stays selected .
I need this because a have a command for the CurrentCellValueChanged , and in this case, if the checkbox value was changed , this method should trigger the RowValidatedEvent by SetCurrentRowValidated on false
With your solution , the RowValidatedEvent it's not triggered , because ( I think so ) there is no CurrentRow