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.

GridTreeControl: SelectedCells

Thread ID:

Created:

Updated:

Platform:

Replies:

102485 Feb 2,2012 03:46 PM Feb 7,2012 06:46 AM WPF 1
loading
Tags: GridControl
anand rengarajan
Asked On February 2, 2012 03:46 PM

How do I iterate and read the value of SelectedCells?


Rajasekar [Syncfusion]
Replied On February 7, 2012 06:46 AM

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




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.

;