[CLOSED] FilterHeader and InfiniteScrolling gives javascript error.

  1. #1

    [CLOSED] FilterHeader and InfiniteScrolling gives javascript error.

    I am getting an error when FilterHeader and InfiniteScrolling is used.

    I have gone through the discussions on

    http://forums.ext.net/showthread.php...nite-scrolling

    This does not solve my problem. Is this issue solved in Version 2.5 Or 3.0

    Please guide.
    Last edited by Daniil; Jan 16, 2015 at 8:33 AM. Reason: [CLOSED]
  2. #2
    Hi @Arohan,

    I am getting an error when FilterHeader and InfiniteScrolling is used.
    Please clarify what is the error? What is the steps to reproduce? What is the test case?:)

    I have gone through the discussions on
    http://forums.ext.net/showthread.php...nite-scrolling

    This does not solve my problem.
    Please clarify what exactly have you tried so far?

    Is this issue solved in Version 2.5 Or 3.0
    It is unlikely fixed in 2.5, because ExtJS 4.2.2 has not been incorporated to Ext.NET.

    As for Ext.NET v3, soon I will be testing all the v2 issues with v3 and post follow-ups in the forum threads with information it is still reproducible or not.
  3. #3
    Hi Daniil,

    Following is the source code,

    <%@ Page Language="C#" %>
    
    <script runat="server">
        protected void Store_ReadData(object sender, StoreReadDataEventArgs e)
        {
            Store store = (Store)sender;
            System.Collections.Generic.List<StockQuotation> data = new System.Collections.Generic.List<StockQuotation>();
    
            int start = e.Start,
                limit = e.Limit;
            Random randow = new Random();
            DateTime now = DateTime.Now;
    
            for (int i = start + 1; i <= start + limit; i++)
            {
                StockQuotation qoute = new StockQuotation()
                {
                    Company = "Company " + i,
                    Price = randow.Next(0, 200),
                    LastUpdate = now
                };
    
                data.Add(qoute);
            }
            store.Data = data;
            e.Total = 50000;
        }
    
        class StockQuotation
        {
            public string Company { get; set; }
            public int Price { get; set; }
            public DateTime LastUpdate { get; set; }
        }
    </script>
    
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <title>Infinite Scrolling - Ext.NET Examples</title>
        <link href="/resources/css/examples.css" rel="stylesheet" />
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <h1>
            Infinite Scrolling</h1>
        <p>
            Ext.Net 2's brand new grid supports infinite scrolling, which enables you to load
            any number of records into a grid without paging.</p>
        <p>
            The new grid uses a virtualized scrolling system to handle potentially infinite
            data sets without any impact on client side performance.</p>
        <ext:GridPanel ID="GridPanel1" runat="server" Width="500" Height="500" Title="Stock Price">
            <Store>
                <ext:Store ID="Store1" runat="server" Buffered="true" PageSize="200" TrailingBufferZone="10"
                    LeadingBufferZone="10" OnReadData="Store_ReadData">
                    <Proxy>
                        <ext:PageProxy>
                            <Reader>
                                <ext:JsonReader Root="data" />
                            </Reader>
                        </ext:PageProxy>
                    </Proxy>
                    <Model>
                        <ext:Model ID="Model1" runat="server">
                            <Fields>
                                <ext:ModelField Name="Company" />
                                <ext:ModelField Name="Price" />
                                <ext:ModelField Name="LastUpdate" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel ID="ColumnModel1" runat="server">
                <Columns>
                    <ext:RowNumbererColumn ID="RowNumbererColumn1" runat="server" Width="50" />
                    <ext:Column ID="Column1" runat="server" Text="Company" DataIndex="Company" Flex="1" />
                    <ext:Column ID="Column2" runat="server" Text="Price, $" DataIndex="Price" Width="70"
                        Align="Center" />
                    <ext:Column ID="Column3" runat="server" Text="Last Update" DataIndex="LastUpdate"
                        Width="140">
                        <Renderer Format="Date" FormatArgs="'n/j/Y g:i:s A'" />
                    </ext:Column>
                </Columns>
            </ColumnModel>
            <View>
                <ext:GridView ID="GridView1" runat="server" TrackOver="false" />
            </View>
          <Plugins>
                <ext:FilterHeader ID="FilterHeader1" runat="server" Remote="true">
                </ext:FilterHeader>
            </Plugins>
            <SelectionModel>
                <ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" runat="server" Mode="Multi"
                    ShowHeaderCheckbox="false">
                </ext:CheckboxSelectionModel>
            </SelectionModel>
        </ext:GridPanel>
        </form>
    </body>
    </html>
    I have added FilterHeader Plugin And used CheckBoxSelectionModel with Mode="Multi"

    Now when I Click Checkbox and Select couple of records it works fine
    Click image for larger version. 

Name:	Check1.jpg 
Views:	7 
Size:	65.6 KB 
ID:	17881

    But, As soon as I try to filter it gives Javascript Error: Type Error: c is undefined and Shows empty grid
    Please see the image
    Click image for larger version. 

Name:	Check2.jpg 
Views:	5 
Size:	38.4 KB 
ID:	17891

    Please help.
  4. #4
    Can you please remove the JsonReader from the store's proxy and check again? Just use:

    <Proxy>
       <ext:PageProxy/>
    </Proxy>
    On a side note, you are trying to use Remote filtering. I am not sure if this what you really want in your example :)
    The https://examples2.ext.net/#/GridPane...Header/Remote/ and https://examples2.ext.net/#/GridPane...Remote_Filter/ examples use different approaches.
    Last edited by Dimitris; Dec 30, 2014 at 8:22 AM.
  5. #5
    I tried your solution, but still it gives same error
  6. #6
    Can you please provide your source code again (with all your latest changes) since it works for me and I cannot investigate further?

Similar Threads

  1. Replies: 10
    Last Post: Jun 14, 2017, 2:00 AM
  2. Replies: 3
    Last Post: Oct 21, 2014, 2:21 PM
  3. Replies: 1
    Last Post: Nov 23, 2013, 3:09 PM
  4. [CLOSED] Javascript Error in V2.x
    By speedstepmem4 in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 18, 2013, 10:26 AM
  5. [CLOSED] FilterHeader Plugin Error
    By leonardm in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 21, 2013, 4:53 PM

Posting Permissions