【发布时间】:2010-04-15 15:22:51
【问题描述】:
我有一个组合框,其中填充了来自数据源的值。默认情况下,选择第一个值很好,但我需要显示“选择国家”作为默认组合框文本。然后用户可以从下拉列表中进行选择。
The reason is when the first value from datasource is chosen as the default value the rest of the form field are automatically filled(implemented in selectindexchange method) but I need the form to be empty on load and diplay "Choose country" as组合框文本。
怎么做?
我的组合框已填满
CountryDetailsBindingSource.DataSource = CountryCtrl.GetCountryDetails(Id)//this returns an array
Me.SelectCountry.DataSource = Me.CountryListBindingSource
Me.SelectCountry.DisplayMember = "CountryName"
Me.SelectCountry.ValueMember = "ID"
感谢任何帮助。
提前致谢
【问题讨论】: