We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

how avoide from highlighting the row in grid

hi,
i have dispayed records in grid and when i click on row header of Grouping Grid control entire row is getting highlighted with some colour.
But i dont want to highlight the row.

1 Reply

HA haneefm Syncfusion Team May 25, 2007 03:39 PM UTC

Hi Swaminath,

For cell based selection in a grid :
>>>>>>>>>>>>>>>>>>>>
You can try this code.

this.gridGroupingControl1.TableOptions.AllowSelection = GridSelectionFlags.Any ^ GridSelectionFlags.Row ;

For record based selection in a grid:
>>>>>>>>>>>>>>>>>>>>
You can handle the SelectedRecordsChanging event and set e.Cancel to true for the RowHeaderCell. Below is a code snippet that show this task.

this.gridGroupingControl1.SelectedRecordsChanging +=new SelectedRecordsChangedEventHandler(gridGroupingControl1_SelectedRecordsChanging);

private void gridGroupingControl1_SelectedRecordsChanging(object sender, SelectedRecordsChangedEventArgs e)
{
if( e.Action == SelectedRecordsChangedType.Added )
e.Cancel = IsRowHeaderCell;
}

Please refer to the attached sample for implementation and let me know if this helps.
GGCCancelRowSelection.zip

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon