Search code examples
androidlistviewselectall

Select all rows and deselect all rows option in listview


I have a list view with a check box in each row to select that row... And i have a select all check box above the listview to select all the rows at a click and vice versa... is it possible to do so...


Solution

  • ListItem item = default(ListItem);
    foreach ( item in MyListView.ListItems) {
        item.Selected = true;
    }
    

    you can use checkbox id instead of item and set it checked or vice versa.