Hi,
I have a load-on-demand combo box but have a problem where you can type something in the text field and even if what is typed does not match an item in the combobox, if you tab out, or click out of the control, the page posts back, the selected index changes and what was typed remains in the combobox text field.
I would like the behaviour of the control to not post back if what someone types does not match an item, but does post back if the item matches. I presume this is a client-side event I need to handle for this, but I would appreciate some help.
Thanks
Tom
Control:
<telerik:RadComboBox ID="ddlStudents" EnableViewState="false" runat="server" EnableVirtualScrolling="true"
ShowMoreResultsBox="true" EnableLoadOnDemand="true" OnItemsRequested="ddlStudents_ItemsRequested"
OnClientDropDownOpening="OnClientDropDownOpening" AutoPostBack="true" EnableItemCaching="true" HighlightTemplatedItems="true" EmptyMessage="Select a student or start typing their name" ExpandAnimation-Duration="150"
MarkFirstMatch="true" EnableTextSelection="true" IsCaseSensitive="false" CollapseAnimation-Duration="9" Skin="Default" DataValueField="StudentId"
DataTextField="CombinedName" ToolTip="Select a student from the drop down list or start typing their name/ID to return only those students matching your criteria."
OnSelectedIndexChanged="ddlStudents_SelectedIndexChanged" MaxHeight="250px" Width="100%">
I have a load-on-demand combo box but have a problem where you can type something in the text field and even if what is typed does not match an item in the combobox, if you tab out, or click out of the control, the page posts back, the selected index changes and what was typed remains in the combobox text field.
I would like the behaviour of the control to not post back if what someone types does not match an item, but does post back if the item matches. I presume this is a client-side event I need to handle for this, but I would appreciate some help.
Thanks
Tom
Control:
<telerik:RadComboBox ID="ddlStudents" EnableViewState="false" runat="server" EnableVirtualScrolling="true"
ShowMoreResultsBox="true" EnableLoadOnDemand="true" OnItemsRequested="ddlStudents_ItemsRequested"
OnClientDropDownOpening="OnClientDropDownOpening" AutoPostBack="true" EnableItemCaching="true" HighlightTemplatedItems="true" EmptyMessage="Select a student or start typing their name" ExpandAnimation-Duration="150"
MarkFirstMatch="true" EnableTextSelection="true" IsCaseSensitive="false" CollapseAnimation-Duration="9" Skin="Default" DataValueField="StudentId"
DataTextField="CombinedName" ToolTip="Select a student from the drop down list or start typing their name/ID to return only those students matching your criteria."
OnSelectedIndexChanged="ddlStudents_SelectedIndexChanged" MaxHeight="250px" Width="100%">