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 to get data from selected row in virtual grid

Please let me know the code through which i would be able to retrieve data of selected rows in virtual grid.

1 Reply

RA Rajagopal Syncfusion Team August 17, 2007 06:47 PM UTC

Hi Yeshwant,

Thanks for your interest in Syncfusion Products.

This can be achieved by using the grid.Selections.GetSelectedRows() method. Below is the code snippet.

// button event handler
GridRangeInfoList rangeList = this.gridControl1.Selections.GetSelectedRows(true, false);
if (rangeList.Count > 0)
{
foreach (GridRangeInfo range in rangeList)
{
for (int row = range.Top; row <= range.Bottom; row++)
{
for (int col = 1; col <= gridControl1.Model.ColCount; col++)
Console.WriteLine(this.gridControl1[row, col].Text);
}
}
}

Let me know if you have any other questions.

Have a nice time.
Regards,
Rajagopal


Loader.
Live Chat Icon For mobile
Up arrow icon