I know there are a number of threads with this issue, I just wanted to post my specific implementation and see if there is a solution to the corner I seem to be in.
Here is my combobox declaration:
I have read the solution to clear the selection as:
rcbAssetAssoc.Text = "";
rcbAssetAssoc.ClearSelection();
and that if the combobox is read-only the AllowCustomText="true" must be set to enable the clear to work.
However, if I set the AllowCustomText="true" that creates a bug in my code because I don't want the user typing in their own values.
Am I missing something?
At the end of the day I want a templated dropdown that forces the user to select one of the options with auto-complete style functionality AND have the box clear ready for the next selection.
Here is my combobox declaration:
<telerik:RadComboBox runat="server" ID="rcbAssetAssoc" ZIndex="100100" Enabled="false" AllowCustomText="false" MarkFirstMatch="true" Width="100%" Height="190px" EnableLoadOnDemand="true" HighlightTemplatedItems="true" OnItemDataBound="rcbAssetAssoc_ItemDataBound"><HeaderTemplate><ul><li class="multiColBoxItem">Serial #</li><li class="multiColBoxItem">Asset #</li><li class="multiColBoxItem">Machine Name</li></ul></HeaderTemplate><ItemTemplate><ul><li class="multiColBoxItem"><%# Eval("SerialNumber") %></li><li class="multiColBoxItem"><%# Eval("AssetNumber") %></li><li class="multiColBoxItem"><%# Eval("MachineName") %></li></ul></ItemTemplate><FooterTemplate><asp:Panel runat="server" CssClass="multiColBoxFooter"><asp:Label runat="server" ID="lblAssetAssocCount" SkinID="atBlueForm" /></asp:Panel></FooterTemplate></telerik:RadComboBox>I have read the solution to clear the selection as:
rcbAssetAssoc.Text = "";
rcbAssetAssoc.ClearSelection();
and that if the combobox is read-only the AllowCustomText="true" must be set to enable the clear to work.
However, if I set the AllowCustomText="true" that creates a bug in my code because I don't want the user typing in their own values.
Am I missing something?
At the end of the day I want a templated dropdown that forces the user to select one of the options with auto-complete style functionality AND have the box clear ready for the next selection.
