views:

41

answers:

1

I want to reach checked rows item in ASP.Net Listview control.

For example:

if 3 Lines of Listview checked, I want to reach checked items value in listview.

How can I do this?

Thanks.

+1  A: 

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;
        }
JPReddy
Error: The type name 'CheckedListViewItemCollection' does not exist in the type 'System.Web.UI.WebControls.ListView
Jack