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

Problem with selected row !

2 Answers 69 Views
Grid
This is a migrated thread and some comments may be shown as answers.
myceno
Top achievements
Rank 1
myceno asked on 24 Mar 2011, 12:18 PM
hey ,
'M new in radcontrols .. and i have a problem with radgrid ..
the prob's when i select a row from grid ,, i cant access the selected row in my cs code ..
wat i was writing when i was using GridView is :
GridView1.SelectedRow.cells[1].text;
can anyone tell me how i can do that with radGrid ?!!

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 24 Mar 2011, 02:25 PM
Hi Myceno,

You can get reference to SelectedRow from SelectedItems collection and then using "ColumnUniqueName" to locate corresponding cell.

CS Code:
    string selectedValue =  (radgrid1.SelectedItems[0] as GridDataItem)["ColumnUniqueName"].Text;

To know more on this topic:
Accessing Cells and Rows


-Shinu.
0
myceno
Top achievements
Rank 1
answered on 24 Mar 2011, 11:14 PM
thxxxxxxxxxxxxxxxxxxxxxxxxxxx .. <3 :p
Tags
Grid
Asked by
myceno
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
myceno
Top achievements
Rank 1
Share this question
or