开发者

combobox with first row blank

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜