开发者

combobox with first row blank

开发者 https://www.devze.com 2023-02-19 19:31 出处:网络
I have a a ComboBox bound to a DataSet. I would like to have combobox w开发者_StackOverflow中文版ith very first row blank. How can I do this?

I have a a ComboBox bound to a DataSet. I would like to have combobox w开发者_StackOverflow中文版ith very first row blank. How can I do this? I've tried following

With .RoomComboBox

     .DataSource = Me.aRoomsBindingSourse

     .DisplayMember = "Room"
     .ValueMember = "BedCode"
     .DataBindings.Add("text", aRoomsBindingSourse, "Room",   False,DataSourceUpdateMode.Never)
     .SelectedIndex = -1
End With

Thank you in advance.


I don't think you can do this. Because .net framework doesn't allow to modify items if the DataSource set.


Hook into the post data bind event and add a row at the first location.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号