[英]How to select the Checked rows in GridviewRow and display it in next page in VB.net
I am trying to get the rows from the gridviewrow and display it in the detail view in next page. 我正在尝试从gridviewrow获取行并将其显示在下一页的详细信息视图中。 I am using Asp.net with VB
我在VB中使用Asp.net
Simply iterate the collection and check the status. 只需迭代集合并检查状态即可。 You can then put the selected rows into a session object or something else to pass on to the next page.
然后,您可以将选定的行放入会话对象或其他内容以传递到下一页。
For Each Row As GridViewRow In MyGrid.Rows
Dim SelectCheck As CheckBox = DirectCast(Row.FindControl("chkSelectForDetail"), CheckBox)
If SelectCheck.Checked
' Add your logic here to save the data or passing on to the detail page.
End If
Next
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.