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

selecting a row

When i select a row on my grid the part where i click is not selected. I need the whole row to be selected and i'm not sure how to do it. This is a read only grid.

Thanks

Shariff Elkordy

untitled40.zip

1 Reply

HA haneefm Syncfusion Team May 29, 2007 06:11 PM UTC

Hi Sharff,

You can do this by setting the ListBoxSelectionMode property to SelectionMode.One and handle the CurrentCellActivating event to activate 0th column cell when ever user clicked on any cell in a grid. Here is a code snippet.

For GridDataBoundGrid and GridControl :
>>>>>>>>>>>>>>>>
this.grid.ListBoxSelectionMode = SelectionMode.MultiExtended;
this.grid.CurrentCellActivating +=new GridCurrentCellActivatingEventHandler(grid_CurrentCellActivating);
private void grid_CurrentCellActivating(object sender, GridCurrentCellActivatingEventArgs e)
{ e.ColIndex = 0;}

For GridGroupingControl :
>>>>>>>>>>>>>>>>
this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended;
this.gridGroupingControl1.TableControlCurrentCellActivating +=new Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellActivatingEventHandler(gridGroupingControl1_TableControlCurrentCellActivating);

private void gridGroupingControl1_TableControlCurrentCellActivating(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCurrentCellActivatingEventArgs e)
{e.Inner.ColIndex = 0; }

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon