Combobox Load on Demand

2 posts, 0 answers
  1. E
    E avatar
    1 posts
    Member since:
    Jun 2010

    Posted 05 Jun 2012 Link to this post

    I am using a Web Method to fill a telerik combobox that is in a user control. (see http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx ).  I would like to put the Web Method code in the code behind for the user control rather than the mainpage code.   

    <telerik:RadComboBox ID="RadComboBox4" runat="server" Width="250px" Height="150px"
                    EmptyMessage="Select a Company" EnableLoadOnDemand="true" ShowMoreResultsBox="true"
                    EnableVirtualScrolling="true"
    >
                    
    <WebServiceSettings Method="GetCompanyNames" Path="defaultcs.aspx" />
    </telerik:RadComboBox>


    So for the path, I would like to put: Path = "usercontrol1.ascx" rather than Path = "defaultcs.aspx", but it cannot find the web method.  Is it possible for a user control to call a web method that is in the code behind for the user control?

  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 08 Jun 2012 Link to this post

    Hello,

    You can not reference a page method of a web service from a user control. It has to be a web page where it could be defined. You could refer to the following forum for more information: http://forums.asp.net/p/977525/1242935.aspx.

    For more information on RadComboBox bound to a web service, you could refer to our online demos, or documentation.

    All the best,
    Ivana
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top