组合框的问题 [英] problem with combobox
本文介绍了组合框的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在组合框中获取名单但是在获取时我想在显示名称列表之前在组合中添加选择单词.plz帮帮我吗?
解决方案
试试这个:
// 绑定后
comboBox1.Items.Insert( 0 , 选择跨度>);
comboBox1.SelectedIndex = 0 ;
这对你有用:)
ComboBox1.Items.Insert ( 0 , 选择项目) ;
ComboBox1.SelectedIndex = 0 ;
-KR
< blockquote>
如果您需要添加select值,则需要手动将select项添加到数据源并将其设置为默认项。
i want to fetch name list in combobox but at the time of fetching i want to add select word in the combo before showing the name list.plz help me?
解决方案
Try this:
//After binding comboBox1.Items.Insert(0, "Select"); comboBox1.SelectedIndex = 0;
This would work for you :)
ComboBox1.Items.Insert(0, "Select Items"); ComboBox1.SelectedIndex = 0;
-KR
if you want need to add "select" value,then you'll need to manually add "select" item to your data source and set that as the default item.
这篇关于组合框的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文