开发者

Select all rows and deselect all rows option in listview

开发者 https://www.devze.com 2023-01-28 07:37 出处:网络
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 开发者_如何学JAVAclick and vice versa...

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 开发者_如何学JAVAclick and vice versa... is it possible to do so...


You can resolve this even easier by simply using 2 methods.

listView.clearChoices();
listView.requestLayout();


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.


The object ListView has a method called clearChoices().

0

精彩评论

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