Click here to Skip to main content
15,442,338 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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


What I have tried:

I've tried using ScriptManager.RegisterClientScriptBlock but no luck. Am I missing something?
Posted
Updated 22-Jun-22 21:14pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900