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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to get data from selected row in virtual grid

Thread ID:

Created:

Updated:

Platform:

Replies:

67425 Aug 17,2007 11:45 AM UTC Aug 17,2007 06:47 PM UTC WinForms 1
loading
Tags: GridControl
Yeshwant Raut
Asked On August 17, 2007 11:45 AM UTC

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

Rajagopal [Syncfusion]
Replied On 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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;