Listview中基于组的选择 [英] Group based selection in Listview

查看:92
本文介绍了Listview中基于组的选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我有一个Listview,其中有ListviewGroups,每个都有两个ListviewItem(在两行中).我希望在每个组中仅应选择一个项目.即,如果一项被选中,则另一项被取消选择.我尝试通过允许mulitselect属性,但它不起作用,有什么方法可以在Listview中放置基于组的限制吗?

预先感谢.

Hello,

I have a Listview in which there are ListviewGroups having two ListviewItems each (in two rows). I want that in each group only one item should be selected. ie if one item is selected the other gets deselected. I tried by allowing mulitselect property but its not working, is there any way to put group based restrictions in Listview?

Thanks in advance.

推荐答案

你好

尝试为此编写代码.我认为这不太难.选择每个项目后,迭代其组中的所有项目,然后取消选择除选定项目之外的所有项目.
也必须允许MultiSelect属性.
Hello

Try to write code for it. I think it''s not too hard. After selecting each item, iterive all items in it''s group and deselect them except the selected item.
MultiSelect Property must be allowed too.


这篇关于Listview中基于组的选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆