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.
Unfortunately, activation email could not send to your email. Please try again.

GetSelectedRows

Thread ID:

Created:

Updated:

Platform:

Replies:

79400 Feb 6,2009 06:16 AM Feb 9,2009 07:48 AM Windows Forms 1
loading
Tags: GridControl
Lincy Rose
Asked On February 6, 2009 06:16 AM

Dear Friend,

When ever i use the below function,
GridRangeInfoList infoList = gridControl.Selections.GetSelectedRows(true,false);

am not getting all the selected rows. It just returns the first selected row only.I would like to what can be the reason for the same.


Nisha Arockiya A [Syncfusion]
Replied On February 9, 2009 07:48 AM

Hi Lincy,

Thanks for your interest in Syncufision Products.

Please try like the below code snippet.


private void button1_Click(object sender, System.EventArgs e)
{
GridRangeInfoList ranges = this.gridDataBoundGrid1.Selections.GetSelectedRows(true, false);
foreach(GridRangeInfo range in ranges)
{
for(int i = range.Top; i <= range.Bottom; ++i)
{
Console.WriteLine(string.Format("Row {0} selected", i));
}
}
}


Let me know if this is not what you needed.

Regards,
Nisha.



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.

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.

;