GridFilters + HttpProxyStore + Hanlder ||How to pass the param

  1. #1

    GridFilters + HttpProxyStore + Hanlder ||How to pass the param

    <ext:HttpProxy Method="POST" Url="/Handler/GetStore.ashx" />

    How to pass the filer text to the handler?
  2. #2

    RE: GridFilters + HttpProxyStore + Hanlder ||How to pass the param

    Hi,

    Use BaseParams or AutoLoadParams of Store*
  3. #3

    When I used BaseParams while using Paging, the first Page on the Grid show 'NaN'

    When using Paging, Grid on first page loads up and shows 'NaN'

    .vb (Sample on Page Load)
     
                ' Load Product 
                ProductsStore.Proxy.Add(New HttpProxy() With {.Method = HttpMethod.GET, _
                                         .Url = Core.Web.ProcessController.ProductGroup.GetAllProductsForProductGroupHandlerUrl() _
                                        })
    
                ' Use for Paging...
                ProductsStore.AutoLoadParams.Add(New Parameter() With {.Name = Core.Constants.START_PARAM, .Mode = ParameterMode.Raw, .Value = "={" + Core.Constants.START_PARAM_NUMBER + "}"})
                ProductsStore.AutoLoadParams.Add(New Parameter() With {.Name = Core.Constants.LIMIT_PARAM, .Mode = ParameterMode.Raw, .Value = "={" + Core.Constants.LIMIT_PARAM_NUMBER + "}"})
                ProductsStore.BaseParams.Add(New Parameter() With {.Name = Core.Constants.PRODUCT_GROUP_ID, .Mode = ParameterMode.Raw, .Value = "={" + CStr(999) + "}"})
    .aspx (Grid)
                <ext:GridPanel ID="gpProductGroupList" runat="server" Height="300px" AutoWidth="true"
                    StoreID="ProductsStore" TrackMouseOver="true" Title="Manage Product Names" StripeRows="true"
                    AutoScroll="true" AutoDataBind="true" AutoExpandColumn="ProductName">
                    <ColumnModel ID="ColumnModel2" runat="server">
                        <Columns>
                            <ext:Column ColumnID="ProductId" DataIndex="ProductId" Header="Product Code" Sortable="true" />
                            <ext:Column ColumnID="UPCCode" DataIndex="UPCCode" Header="UPC Code" Sortable="true" />
                            <ext:Column ColumnID="ProductName" DataIndex="ProductName" Header="Product Name"
                                Sortable="true" />
                        </Columns>
                    </ColumnModel>
                    <View>
                        <ext:GridView ID="gvProduts" runat="server" ForceFit="true" EnableRowBody="true" />
                    </View>
                    <SelectionModel>
                        <ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" runat="server" HideCheckAll="true"
                            SingleSelect="false" />
                    </SelectionModel>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="20" DisplayInfo="true"
                             DisplayMsg="Displaying items {0} - {1} of {2}" EmptyMsg="No items to display" />
                    </BottomBar>
                    <LoadMask ShowMask="true" Msg="Loading..." />
                </ext:GridPanel>
    .aspx (Store)
        <ext:Store ID="ProductsStore" runat="server" RemoteSort="true" AutoLoad="false">
            <Reader>
                <ext:JsonReader Root="Data" ReaderID="ProductId" TotalProperty="TotalRecords">
                    <Fields>
                        <ext:RecordField Name="ProductId" Type="String" />
                        <ext:RecordField Name="MarketID" Type="String" />
                        <ext:RecordField Name="ProductName" Type="String" />
                        <ext:RecordField Name="UPCCode" Type="Int" />
                        <ext:RecordField Name="FreshDryIndicator" Type="String" />
                        <ext:RecordField Name="EquivalentUnits" Type="Int" />
                        <ext:RecordField Name="JobTag" Type="Int" />
                        <ext:RecordField Name="ActiveFlag" Type="Int" />
                        <ext:RecordField Name="LastModifyUserID" Type="Int" />
                        <ext:RecordField Name="LastModifyDateTime" Type="Date" />
                        <ext:RecordField Name="InsertionDateTime" Type="Date" />
                        <ext:RecordField Name="InGroup" Type="Boolean" />
                    </Fields>
                </ext:JsonReader>
            </Reader>
            <Listeners>
                <Load Fn="selectRows" />
            </Listeners>
        </ext:Store>
    Or within the Javascript like below...
      ProductsStore.load({ params: { productGroupID: record.ProductGroupID} });
    Last edited by RonaldR; Jun 22, 2011 at 7:57 PM. Reason: Extra Comments...
  4. #4

    [SOLVED]: my PAGING starts up with "NaN" as the first page...

    I solved my issue which I found on your Forum, "[CLOSED] Remote paging GridPanel"

    I used this below:

                ProductsStore.BaseParams.Add(New Parameter() With {.Name = Core.Constants.START_PARAM, .Value = "={" + Core.Constants.START_PARAM_NUMBER + "}"})
                ProductsStore.BaseParams.Add(New Parameter() With {.Name = Core.Constants.LIMIT_PARAM, .Value = "={" + Core.Constants.LIMIT_PARAM_NUMBER + "}"})

Similar Threads

  1. tab.reload() not passing in updated param value!
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Jul 26, 2011, 10:10 AM
  2. [CLOSED] [1.0] Problem with very large param
    By juane66 in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 24, 2010, 12:50 AM
  3. Replies: 0
    Last Post: Feb 18, 2010, 4:28 AM
  4. Tab - Autoload Param value?
    By Tbaseflug in forum 1.x Help
    Replies: 3
    Last Post: Jun 17, 2009, 4:02 PM
  5. How to set AutoLoad Param client side?
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: Jun 08, 2009, 2:24 PM

Posting Permissions