How to set selected value from Combobox?

前端 未结 11 2007
梦谈多话
梦谈多话 2020-12-01 15:33

I use combobox in c# windows form. I bound the item list as below:

var employmentStatus = new BindingList>();

emplo         


        
11条回答
  •  悲&欢浪女
    2020-12-01 16:06

    In windows Appliation we use like this

     DDLChangeImpact.SelectedIndex = DDLChangeImpact.FindStringExact(ds.Tables[0].Rows[0]["tmchgimp"].ToString());
     DDLRequestType.SelectedIndex = DDLRequestType.FindStringExact(ds.Tables[0].Rows[0]["rmtype"].ToString());
    

提交回复
热议问题