Hello Infragistsics,
i use V 11.1.20111.2064. In the example http://media.infragistics.com/community/aspnet/media/webdropdown/template/web/wdd-template.wmv
they show the use of the WebDropDown with <ItemTemplate>. After first PageLoad looks fine. After a Page Reload is the DropDownContainer clear. Is this a bug?
The Value EnableViewstate is True and the WebDropDown.SelectedValue is ok after Page.reload.
<ig:WebDropDown ID="WebDropDown_Va" runat="server" DisplayMode="DropDownList" TextField="IV_Vart" DataKeyFields="IV_Vart" DataSourceID="SqlDataSource_Varten" > <AutoPostBackFlags ValueChanged="On" /> <DropDownItemBinding TextField="IV_Vart" /> <ItemTemplate> <span style="font-weight:bold;"><%# DataBinder.Eval(Container.DataItem, "IV_Vart")%> - </span> <%# DataBinder.Eval(Container.DataItem, "IV_Vart_Bezeich")%> </ItemTemplate></ig:WebDropDown>
What can i do, that the Selection Values are to see in DropDownArea?
You wrote in other Tread:
If you are using <ItemTemplate> you will have to rebind (call DataBind() on the control), after every postback. Data Items are not stored into ViewState , therefore your DataBinding expressions will not evaluate any data.
Thanks,
Angel
Yes, OK: I have now:
Private Sub WebDropDown_Vart_Load(sender As Object, e As System.EventArgs) Handles WebDropDown_Vertragsart.Load WebDropDown_Vart.DataBind()End Sub
The Values in the DropDownArea are now visible. But after the Postback is the SelectedValue from the Control destroy. The WebDropDown.SelcectedValue ist ever the Deaultvalue.How can I restore the Users SelectedValue?Thanks.
The Values in the DropDownArea are now visible. But after the Postback is the SelectedValue from the Control destroy. The WebDropDown.SelcectedValue ist ever the Deaultvalue.
How can I restore the Users SelectedValue?Thanks.