[英]how to get gridview selected column
在asp.net C#vs05.window平台上工作,我可以保存Tag屬性的值。如何在Web上使用此屬性?通過使用tag屬性,我可以輕松獲取所選的row.code片段
class name object = (className)listviewName.SelectedItems[0].Tag;
我想讓我的gridview在上面的對象中選擇行值。如何獲取它?
// Get the selected row from the GridView control.//
GridViewRow selectRow = AuthorsGridView.SelectedRow
//If the first column is, for example, LastName ...//
String lastName = selectRow.Cells[1].Text;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.