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?
Hi I am also having the same issue i am doing the same
ddlCSModel.DataBind() if not postback even then i can see the text but the values are available this is very strange when i click on that specific row i get the exact value but cannot see the text please let me know if i am missing out anything.
<ig:WebDropDown runat="server" ID="ddlCSModel" Width="200px"
loadingItemsMessageText ="loading..."
AutoPostBack="true"
DropDownContainerHeight="150px"
DropDownContainerWidth="500px"
OnSelectionChanged="ddlCSModel_SelectionChanged"
EnableViewState="true"
>
<HeaderTemplate>
<table style="width: 100%; height: 40px; background-color:DarkBlue;color: White; font-size: 20px; font-weight: bold;" cellspacing="0" cellpadding="4">
<tr>
<td style="width: 350px;">
Model Name
</td>
<td style="width: 150px;">
As of Date
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table style="width: 100%;" cellspacing="0" cellpadding="4">
<tr style="border-bottom: solid 1px #ff0000;">
<%# DataBinder.Eval(Container.DataItem, "MODEL_NAME")%>
<td style="width: 150px; padding-left: 10px;">
<%# DataBinder.Eval(Container.DataItem, "AsOfDate")%>
</ItemTemplate>
</ig:WebDropDown>
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.
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