Select grid columns

Hi,

When we click on the cell(0,0) in the grid,all the rows and columns of the grid are selected by default. I want to implement the same when user clicks some other cell say cell(1,2) Any pointers on how i can do this?

Thanks in advance,
Raj

2 Replies

HA haneefm Syncfusion Team August 10, 2007 02:47 PM UTC

Hi Raj,

Please try these code:

void gridControl1_CellClick(object sender, GridCellClickEventArgs e)
{
GridControl grid = sender as GridControl;
grid.Model.Selections.Add(GridRangeInfo.Table());
}

Best regards,
Haneef


RA Raj August 10, 2007 03:09 PM UTC

Hi Haneef,

Thanks a lot for the help.

Regards,
Raj

>Hi Raj,

Please try these code:

void gridControl1_CellClick(object sender, GridCellClickEventArgs e)
{
GridControl grid = sender as GridControl;
grid.Model.Selections.Add(GridRangeInfo.Table());
}

Best regards,
Haneef

Loader.
Up arrow icon