I'm able to bind the WebCombo control to a datasource so it shows the list of values in the dropdown, but I can't figure out how to bind it to another datasource that will have the selected value. In the MS DropDownList, there's a SelectedValue property that can be bound, what's the equivalent for the WebCombo? I've tried using DisplayValue but get an error that Bind/Eval "can only be used in the context of a databound control".
Nathan
Thanks for your reply, however is there the possibility to do this in the aspx page? and not directly in the C#
Nathan,
You can use something like this:
this.webCombo.Rows.FromKey("1").Selected = true; //if you want to select the row with Id=1
In the InitializeRow event you must set the key:protected void webCombo_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e){ e.Row.Key = e.Row.Cells.FromKey("Id").Text;}
I hope it help.
Johni Ecco
Same problemo here.
My site uses a form view that ties to a object data source with several one-display-column combos tha tie to SqlProviders. One of the data columns is "previous plan" - used to be a text box. Like we all know, users typed and mistyped into the textbox so Mgt said - replace that with a ComboBox. Now, they want to display it as "Plan Name; Provider Name". I plonked a webcombo down there and was able to display multiple columns - users are happy. How do you databind this webcombo to the appropriate column for the EditItem Template?
Help help.
I also have the same problem, is there any solution for this?