Hi,
I have combobox at windows application, In that i bind data to combobox Eg: iam binding roll no 1 2 3 like that while at runtime i need a empty blank space first then 1 2 3 i need it at runtime (Problem is data is binding to combobox properly, i need a empty blank record at first) give me sample
Regards, Suganya
In order to succeed, you must first be willing to fail! Rate my post!.If u found useful
|
| Author: Reach2Shaik 07 Nov 2009 | Member Level: Gold | Rating:  Points: 2 |
after binding data to combobox
write
Combobox.SelectedValue = -1;
Don't forget to rate this answer, if it is helpful... Regards Shaik
|
| Author: Deepika Haridas 07 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Hello,
You can write
cmbxtestID.SelectedIndex = -1;
Thanks & Regards, Deepika Editor
If U want to shine like a SUN..First U have to burn like the SUN!! Need a Guide? Join my mentor program..
|
| Author: Dharmaraj 07 Nov 2009 | Member Level: Diamond | Rating:  Points: 2 |
Hi, You can set the values to the
comboBox1.SelectedIndex=-1; //or you can have like this comboBox1.Text=""; // at the form load or the page load
Regards, Dharma Editor,Mentor,MVM Try and fail but don't fail and try Me and DNS
|
| Author: Kirtan 08 Nov 2009 | Member Level: Silver | Rating:  Points: 2 |
You can not Add New Item to Bound Combobox.
but before Binding Combobox with DataTable Add one new Blank DataRow
in Datable to Solve the Problem
Kirtan Patel ----------------------------------------------------- Master Of Computer Application(Sem-1) Bachelore of Computer Application
|
| Author: Selvam 14 Nov 2009 | Member Level: Bronze | Rating:  Points: 2 |
hi, in Form_load() u can use
ComboBoxName.SelectedIndex=-1
and where ever u need to be empty comboBox u can use this code
|