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

GetSelectedRows

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.


1 Reply

NA Nisha Arockiya A Syncfusion Team February 9, 2009 12:48 PM UTC

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.



Loader.
Live Chat Icon For mobile
Up arrow icon