如何禁用列表视图选中的项目 [英] how to disable listview selected item

查看:90
本文介绍了如何禁用列表视图选中的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我设计了一个包含两个列表视图的控件.
添加了一个按钮.单击第一个列表中的按钮项时,该项将添加到另一个列表中.
现在,在添加到第二个列表之后,我想从第一个列表中禁用,以使用户无法再次添加

Plz帮助,adhann中的Thanx.

Hi, I have designed a control which contain two list view.
Added a button. on the click of button items from 1st list gets added to another.
Now after adding to second list i want to disable from 1st list so that user cant add again

Plz help, Thanx in advn.

推荐答案

由于它是单一选择机制,因此另一种可能性是使用检查列表视图.这样,您将不需要两个单独的列表视图,但是用户可以选中/取消选中其中包含的项目.
Since it''s a single select mechanism, another possibility would be to use checked list view. This way you wouldn''t need two separate list views but the user would check/uncheck the items that are included.


从第一个列表中删除它,而不是尝试禁用它.这是标准行为.
Remove it from the first list instead of trying to disable it. That''s the standard behavior.


这篇关于如何禁用列表视图选中的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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