开发者

listview checkbox checked row item

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;
        }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜