4 Answers, 1 is accepted
0
Justin
Top achievements
Rank 1
answered on 05 Mar 2009, 08:41 PM
Ok, about 5 min after I posted this I had an idea.
I populate my combobox with a WCF Service. On the "Completed" event, I just do something like this:
Seems to work well...
I populate my combobox with a WCF Service. On the "Completed" event, I just do something like this:
e.Result.Insert(0, new MyClass(){ Name = "-- Create New --", Id = -1 }); |
ComboBox.ItemsSource = e.Result; |
ComboBox.SelectedIndex = 0; |
Seems to work well...
0
Serrin
Top achievements
Rank 1
answered on 06 Mar 2009, 08:11 PM
That's good thinking, thanks for posting your solution, I'm definitely going to need to use that in the very near future!
0
Anusha
Top achievements
Rank 1
answered on 22 Dec 2012, 07:44 AM
I have a combobox in which list items are coming from table.I have successfully bind the list item.Now i want to show the default text of combobox --Select-- on pageload .
Please suggest me how to do this.
Thanks,
Please suggest me how to do this.
Thanks,
0
Hello,
I would suggest you to use the same approach you already used for the Create new option. I guess you didn't apply it, because the collection you receive is read-only. If this is the case you could create a brand new collection and insert all the data from the data table you want to display and also add the default option.
Hope this helps.
All the best,
Miroslav Nedyalkov
the Telerik team
I would suggest you to use the same approach you already used for the Create new option. I guess you didn't apply it, because the collection you receive is read-only. If this is the case you could create a brand new collection and insert all the data from the data table you want to display and also add the default option.
Hope this helps.
All the best,
Miroslav Nedyalkov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.