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

GridTreeControl: SelectedCells

How do I iterate and read the value of SelectedCells?


1 Reply

RA Rajasekar Syncfusion Team February 7, 2012 11:46 AM UTC

Hi AR,

Thanks for your update.

You can achieve your requirement by using the below code snippet,

Code Snippet[C#]

for (int i = gtc.Model.SelectedRanges.ActiveRange.Top; i < gtc.Model.SelectedRanges.ActiveRange.Bottom; i++)
{
for (int j = gtc.Model.SelectedRanges.ActiveRange.Left; j < gtc.Model.SelectedRanges.ActiveRange.Right; j++)
{
string cellValue = gtc.Model[i, j].CellValue.ToString();
}
}

Please let us know if you have any queries.

Thanks,
Rajasekar




Loader.
Live Chat Icon For mobile
Up arrow icon