How to select all the Rows in the DataGrid(GridDataControl)

I'm using a GridDataControl and while loading the DataGrid all the Rows in the DataGrid should be selected.



1 Reply

PA Ponraja A Syncfusion Team November 24, 2010 01:31 PM UTC

Hi Ramana,

Thanks for choosing Syncfusion products.

You can achieve your requirement using SelectedRange property of the GridDataControl. In that we can add the full range of the grid while it is loaded then it will be select all rows in the grid.

[Sample Code]
[C#]

void dataGrid_ModelLoaded(object sender, EventArgs e)
{
this.dataGrid.Model.SelectedRanges.Add(GridRangeInfo.Table());
}

Please let us know if you need any more details.

Regards,
Ponraja


Loader.
Up arrow icon