Hi All,
I am stuck while calling javascript function from code behind on OnItemsRequested event. somehow I can call same js from OnTextChanged event.
b
below is my code please help-
asp.net -
<telerik:RadComboBox ID="ddl1" runat="server" Height="150" OnClientItemsRequesting="OnClientRequestingAC" OnItemsRequested="ddl1_ItemRequested" EmptyMessage="" EnableLoadOnDemand="true" ShowMoreResultsBox="false" EnableVirtualScrolling="false" AutoPostBack="true" MarkFirstMatch="false" ShowDropDownOnTextboxClick="false" Style="width: 200px; height: 20px !important;" MinFilterLength="3" ForeColor="Black" ShowToggleImage="true" ToolTip="Search by inputing number. Press Enter to select." LoadingMessage="Loading matching records..." OnClientItemsRequestFailed="OnClientACRequestFailedHandler" OnTextChanged="ddl1_TextChanged" OnSelectedIndexChanged="ddl1_SelectedIndexChanged" onkeyup="return CallMethod(event,this.id);">
in server side code-
Protected Sub ddl1_ItemRequested(sender As Object, e As RadComboBoxItemsRequestedEventArgs) '' Doing some data fetching and JSON request preparation here... System.Web.UI.ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "SearchRequestedJS", "GetSearchQueryData('" + JSONrequest + "');", True) Catch ex As Exception End Try End Sub