How do I clear a combobox?

前端 未结 16 1807
醉梦人生
醉梦人生 2020-12-04 18:55

I have some combo-boxes that are set up as drop down lists, and the user can pick a number in them. I also have a Clear button that should clear the text from the combo boxe

16条回答
  •  暖寄归人
    2020-12-04 19:25

    You can use

    Cbo.Items.Clear();
    

    or

    Cbo.DataSource = null;
    

    if you have a binding on it.

提交回复
热议问题