I want to reach checked rows item in ASP.Net Listview control.
For examp开发者_开发知识库le:
if 3 Lines of Listview checked, I want to reach checked items value in listview.
How can I do this?
Thanks.
You can use listview property 'CheckedItems'.
You can get list of items which are checked using listview.CheckedItems. For the value in that item, based on the subitem index you need to fetch it. For ex.
ListView.CheckedListViewItemCollection checkedItems =
ListView1.CheckedItems;
foreach ( ListViewItem item in checkedItems )
{
value = item.SubItems[1].Text;
}
精彩评论