Highlight entire grid

Hey,

I was wondering if anyone knows why when I use
griddataboundgrid1.ListBoxSelectionMode = SelectionMode.MultiExtended to highlight the entire row when I click on a cell, I then loose the ability to click on the top left corner to highlight the entire grid. Is there a way I can have both functions working together? Thanks...

Charlie

1 Reply

AD Administrator Syncfusion Team November 13, 2006 04:19 AM UTC

Hi Charlie,

Use the Model.Selections property to manages selected ranges in the grid. It allows you to add and remove selections, determines selection state of a specific cell. Try the below code in the CellClick event of the grid.

private void grid_CellClick(object sender, GridCellClickEventArgs e)
{
if( e.ColIndex == 0 && e.RowIndex == 0 )
this.gridDataBoundGrid1.Model.Selections.Add(GridRangeInfo.Table());
}

Best Regards,
Haneef

Loader.
Up arrow icon