提神组合框 [英] refreshing combo box

查看:80
本文介绍了提神组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!我在组合框中有问题..当我在组合框中选择了值时,即使我使用了功能combo box1.refresh();组合框中的值仍保持不变.但它没有刷新..我如何再次设置它?在这里我解释...例如,我在组合框中有像男性和女性..这样的值,并在窗体加载预先写在组合中的文本框是选择性别,值是男性和女性...当客户选择值男性时,当单击刷新按钮后提交表单值时,组合框中的值必须刷新,然后在组合框中再次显示如果您需要帮助,请刷新刷新之后选择性别文本.....

解决方案

^ ]可能会有所帮助.


这可能对您有帮助.....
最后在单击按钮时编写此代码

comboBox1.Items.Clear();
comboBox1.Items.Add("---select---");
comboBox1.Items.Add("Male");
comboBox1.Items.Add("Female");


您可以使用

combobox1.text=string.Empty;



清除组合框.

希望对您有所帮助:)

有关更多查询,请在此处评论!!

hi! i have problem in the combo box ..when i select the value in the combo box the value in the combo box remain unchanged even i used the function combo box1.refresh(); but it did not refresh..how can i set it again ??here i explain ...for example i have values in the combo box like male and female ..and at the form load the text that is pre written in the combo box is select gender and the values are male and female ...when the customer select the value male and when the form values submit after click on refresh button the vallue in the combo box must be refresh and again in the combo box there should be select gender text.....after refreshing thanx if u help

解决方案

This[^] may help.


this may help you.....
Write this code at last in button click

comboBox1.Items.Clear();
comboBox1.Items.Add("---select---");
comboBox1.Items.Add("Male");
comboBox1.Items.Add("Female");


You can use

combobox1.text=string.Empty;



to clear the combobox.

hope this help :)

for further queries comment here!!


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

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