开发者

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 开发者_如何学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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜