单击按钮事件后如何取消选择列表框项。 [英] How to deselect the listbox item after click on button event.

查看:137
本文介绍了单击按钮事件后如何取消选择列表框项。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai



我有一个文本框,列表框和按钮控件。在列表框中控制multiselectoption为true。点击按钮后事件值被插入数据库。但是所选的列表框项目仍然处于选择模式。我如何清除它。



提前谢谢。

Hai

I am having a textbox,listbox and button control.In the list box control multiselectoption to true.After click on button event values are inserted into database.But the selected listbox items is still in select mode.How can i clear this.

Thanks in advance.

推荐答案

写一个on click事件保存到数据库,一旦项目保存在数据库中,将selected属性设置为false?
Write a on click event to save to the database, once the items have saved in the database, set the selected attribute to false ?






一旦插入列表值,

你应该调用这段代码来设置所有选中的项目== false



ListBox1.ClearSelection();



希望这会对你有所帮助。



问候,

RK
Hi,

Once list values are inserted,
you should call this code to set all items selected == false

ListBox1.ClearSelection();

Hope this helps you a bit.

Regards,
RK


这篇关于单击按钮事件后如何取消选择列表框项。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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