This is a migrated thread and some comments may be shown as answers.

RadGrid SelectedItems

2 Answers 628 Views
Grid
This is a migrated thread and some comments may be shown as answers.
murat2912
Top achievements
Rank 1
murat2912 asked on 24 Jan 2011, 08:56 AM
Hi.I am using radcontrols Q4 2006 for ASP.Net.I have a grid which autogeneratecolumns = true and enable client side selection = true.I want to get selecteditems and cell values.When i try grid.SelectedItems[i].Cell[0].Text it gives me &nbsp .How can i get cell value.Thanks...

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 Jan 2011, 10:00 AM
Hello,


The documentation shows how to get the cell values for Selected rows in grid.
Getting cell values for selected rows client side


-Shinu.
0
Veli
Telerik team
answered on 24 Jan 2011, 10:04 AM
It seems you are trying to get the cell text server-side. To do that, you need to start counting from index 2. This is because the first 2 cells (at index 0 and 1) belong to 2 service columns that are always initialized in RadGrid, even though they are not visible. So, the first visible column cell in your grid starts from index 2. Thus, your code becomes grid.SelectedItems[i].Cell[2].Text. Try that.

Veli
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
murat2912
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Veli
Telerik team
Share this question
or