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.
Hi
I tried dropdownitembinding.TextField but still on the postback i cannot see the text in the itemtemplate and can only see blank items but still the values are there when i click on the links so can i please demonstrate it if you have a min.
Regards
Raghu
Hello BBL_MV and raghumuvvala,
Please let me know if you still need help with your issues.
Hello raghumuvvala,
To get the information displaying, you need to set up your DropDownItemBinding.TextField property in the WebDropDown.
Please see our following WebDropDown documentation for more information:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.2/CLR4.0/html/Web_WebDropDown.html
If you have any further questions, please let me know.
Hello BBL_MV,
In order to restore the SelectedItem, I suggest storing the Index in the Session variable. After you call DataBind on the DropDown, you can use the session variable to restore the SelectedItem. Please refer to the following forum post where a similar issue was resolved in this way:
http://forums.infragistics.com/forums/p/55023/285234.aspx#285234
If you have any other questions please let me know.
Hello BBL MV and raghumuvvala,
I'll be looking into this issue for you. I'm going to need some time to do some research and find the cause to this issue. I can give you an update by the end of Friday.
If either of you have any other questions or concerns with this matter, please let me know.