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 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>
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 and raghumuvvala,
Please let me know if you still need help with your issues.
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