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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridTreeControl: SelectedCells

Thread ID:





102485 Feb 2,2012 08:46 PM UTC Feb 7,2012 11:46 AM UTC WPF 1
Tags: GridControl
anand rengarajan
Asked On February 2, 2012 08:46 PM UTC

How do I iterate and read the value of SelectedCells?

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



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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