I am able to see all the data and also filter but can't get the
If I type jo in the box I want to see the record John Smith with "Jo" bolded and highlighted ?
Here is my aspx and JS below:
<
telerik:RadComboBox ID="rcbUser" runat="server" AllowCustomText="false" DropDownWidth="300px"
EmptyMessage="Enter a hint or Select Employee" EnableLoadOnDemand="true" EnableTextSelection="false"
Height="200px" HighlightTemplatedItems="true" OnItemDataBound="rcbUser_ItemDataBound" Filter="Contains"
OnItemsRequested="rcbUser_ItemsRequested" SkinID="ddRegular" ToolTip="Enter a hint or Select Employee"
Width="200px" EnableVirtualScrolling="true" OnClientItemsRequesting="OnClientItemsRequesting"
ShowMoreResultsBox="true" ItemsPerRequest="15">
<HeaderTemplate>
Client Script:
<script type="text/javascript">
//on upload button click temporarily disables ajax to perform upload actions
function conditionalPostback(sender, args) {
if (args.EventTarget == "<%= btnCreate.UniqueID %>") {
args.EnableAjax =
false;
}
}
function OnClientItemsRequesting(sender, eventArgs) {
var context = eventArgs.get_context();
context[
"FilterString"] = eventArgs.get_text();
// if (sender.get_text().length < 2) {
// eventArgs.set_cancel(true);
// }
// //Highlight the matches based on the combobox text
sender.highlightAllMatches(eventArgs.get_text());
if (sender.get_items().get_count() > 0)
sender.get_items().getItem(0).highlight();
}
</script>