我有一个radgrid,它嵌套在一个radlistview中。有人知道如何通过点击按钮来引用radgrid吗?我目前正在循环访问radlistview,并且我想在该循环中循环访问radgrid。
For Each item As RadListViewDataItem In RadListView1.Items
'I AM SAVING RADLISTVIEW ITEMS HERE
'THIS IS THE POINT WHERE I NEED TO ACCESS RADGRID1
'WHICH I DON'T KNOW HOW TO DO
For Each item As GridDataItem In Radgrid1.MasterTableView.Items
'I WILL BE SAVING RADGRID ITEMS HERE
Next
Next发布于 2017-04-07 18:05:39
在浪费了很长时间之后,我发现在发布这个问题大约两分钟后,我就知道了如何做我想做的事情。基本上,我使用FindControl来获得我的雷达网格,然后我可以像往常一样循环。不知道为什么我没早点想到这点。
Dim gvHours As RadGrid = DirectCast(item.FindControl("gvHours"), RadGrid)
For Each item As GridDataItem In gvHours.MasterTableView.Items
'DO STUFF HERE
Nexthttps://stackoverflow.com/questions/43274718
复制相似问题