4 Answers, 1 is accepted
0
Kiara
Top achievements
Rank 1
answered on 04 May 2008, 04:08 PM
Ammar, I think that the equivalent syntax with the Telerik RadGrid is:
CType(MyRadGrid.SelectedItems(0), GridDataItem)("<MyColumnUniqueName>").Text
How to access data in RadGrid rows you can find out from these sources:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/AccessingCellsAndRows/DefaultCS.aspx
http://www.telerik.com/help/radcontrols/aspnet%2Dajax/?grdAccessingCellsAndRows.html
Kiara
CType(MyRadGrid.SelectedItems(0), GridDataItem)("<MyColumnUniqueName>").Text
How to access data in RadGrid rows you can find out from these sources:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/AccessingCellsAndRows/DefaultCS.aspx
http://www.telerik.com/help/radcontrols/aspnet%2Dajax/?grdAccessingCellsAndRows.html
Kiara
0
Princy
Top achievements
Rank 2
answered on 05 May 2008, 10:35 AM
Hi Ammar,
I tried with the following line of code in a Button click event to access the selected cell text.
CS:
Thanks
Princy.
I tried with the following line of code in a Button click event to access the selected cell text.
CS:
protected void Button1_Click(object sender, EventArgs e) |
{ |
string selecteditem = RadGrid1.SelectedItems[0].Cells[1].Text; |
} |
Thanks
Princy.
0
Ammar
Top achievements
Rank 2
answered on 05 May 2008, 04:44 PM
Hi My friends
I rtied both, but it always, says index out of range.
I rtied both, but it always, says index out of range.
0
Kiara
Top achievements
Rank 1
answered on 06 May 2008, 11:22 AM
This can happen if you do not have selected rows in the grid since the SelectedItems collection is empty. Do you handle this case, what you found when you debugged your code?
Kiara
Kiara