【发布时间】:2013-07-12 09:01:29
【问题描述】:
我正在尝试从名为 GridView 的 RadGrid 中获取选定的用户名,该用户名是 RadGrid 上名为 UserName 的列。
我试过了:
GridDataItem item =(GridDataItem)GridView.MasterTableView.Items[GridView.SelectedItems[0].ItemIndex];
string lblOrdHeadName = item["UserName"].Text;
但这会在第一行引发错误:
'索引超出范围。必须是非负数且小于集合的大小。'
有谁知道我可以做些什么来完成这项工作?
【问题讨论】:
标签: c# asp.net telerik radgrid