AjaxProxy ExtraParams doesn't work

  1. #1

    AjaxProxy ExtraParams doesn't work

    I have a combobox which fills it's data through an ASMX Web Service and I would like to pass an Extra Param (the country) in order to show only that country's cities. Country name must come from another Ext.NET control, a Cycle button's text. But the page cannot even load because it says it can't find the cycle button control. Following are the CycleButton's, the ComboBox's and the Web service's code.
    <ext:CycleButton MinWidth="197" Width="197" ID="MyCycleButton" runat="server" ShowText="true">
                                                <ext:Menu runat="server" MaxHeight="200">
                                                <Click Handler="MyApp.sampleFunction(this,e)" />
                                            LabelStyle="margin-left: 85px;"
                                            <ListConfig LoadingText="Searching...">
                                                <ItemTpl runat="server">
                                                        <div style="font-weight: normal;">
                                                <ext:Store ID="StoreSearchCities" runat="server" AutoLoad="false" PageSize="5" RemoteFilter="true">
                                                        <ext:AjaxProxy Url="../../Services/UserService.asmx/GetCountryCities" " FilterParam="CityName">
                                                            <ActionMethods Read="POST" />
                                                                <ext:JsonReader Root="data" />
                                                                <ext:Parameter Name="Country" Value="#{MyCycleButton}.getText()" Mode="Raw" />
                                                        <ext:Model runat="server" IDProperty="CityName" AutoDataBind="true">
                                                                <ext:ModelField Name="CityName" />
    [WebMethod(EnableSession = true)]
            public void GetCountryCities(string country)
                HttpContext.Current.Response.ContentType = "application/json";
                var requestParams = new StoreRequestParameters(HttpContext.Current);
                int start = requestParams.Start;
                int limit = requestParams.Limit;
                string filter = !string.IsNullOrEmpty(requestParams.Query) ? requestParams.Query : "";
                if (filter == "*")
                    filter = "";
                Paging<City> resultCities = UserDataAccess.GetCountryCities(start, limit, filter, country);
    When I use the following Extra Params the ASMX country paramater is filled correctly, but I just want to be dynamic..
    This works:
              <ext:Parameter Name="Country" Value="Greece" Mode="Value" />
    So the question is, how i can pass every time the CycleButton's text as an extra parameter to my ASMX service?

    Kind regards,
  2. #2

Similar Threads

  1. [CLOSED] RemoteValidation with ExtraParams not work
    By trePjt in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 03, 2014, 1:26 AM
  2. [CLOSED] DirectMethod doesn't work
    By Geenin in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 16, 2014, 6:42 AM
  3. Project Ext.Net.UX doesn't work.
    By flaviodamaia in forum 2.x Help
    Replies: 6
    Last Post: Nov 01, 2012, 1:41 PM
  4. [1.0RC]MultiHeader doesn't work.
    By firebank in forum 1.x Help
    Replies: 1
    Last Post: Nov 11, 2010, 4:06 PM
  5. Keymap doesn't work
    By Kamal in forum 1.x Help
    Replies: 2
    Last Post: Aug 13, 2009, 10:49 AM

Posting Permissions