[CLOSED] Editable grid with server paging with Store warning on dirty = true leads to JavaScript error

  1. #1

    [CLOSED] Editable grid with server paging with Store warning on dirty = true leads to JavaScript error

    I have an editable grid with server side paging. I set the store to warn on dirty. If I edit some grid contents on page 1 and try to go to the next page, I correctly get the Store confirmation about being sure to reload data. If I click yes, I get a JavaScript error:

    this.originalLoad is not a function
    Here is an example to reproduce it:

    <%@ Page Language="C#" %>
    <script runat="server">
        public class Data
            public int Id { get; set;}
            public string Name { get; set;}
            public static List<Data> SampleData
                    var data = new List<Data>();
                    for (int i = 0; i < 10; i++)
                        data.Add(new Data { Id = i, Name = "Blah " + i });
                    return data;
        protected void Store1_ReadData(object sender, StoreReadDataEventArgs e)
            int start = e.Start;
            int limit = e.Limit;
            Paging<Data> data = GetData(start, limit);
            e.Total = data.TotalRecords;
            Store1.DataSource = data.Data;
        private static Paging<Data> GetData(int start, int limit)
            var data = Data.SampleData;
            int totalNumber = data.Count;
            int numberToGet = start + limit > totalNumber ? totalNumber - start : limit;
            return new Paging<Data>(data.GetRange(start, numberToGet), totalNumber);
    <!DOCTYPE html>
    <head runat="server">
        <title>Simple Grid - Ext.NET Examples</title>
        <ext:ResourceManager runat="server" />
        <ext:Viewport runat="server" Layout="fit">
                <ext:GridPanel runat="server" Title="Simple Grid">
                                <ext:Model runat="server" IDProperty="Id">
                                        <ext:ModelField Name="Id" Type="Int" />
                                        <ext:ModelField Name="Name" />
                                <ext:PageProxy />
                            <ext:Column Text="Id" DataIndex="Id" Width="25" />
                            <ext:Column Text="Name" DataIndex="Name" Flex="1">
                                    <ext:TextField runat="server" />
                        <ext:CellEditing runat="server" />
                        <ext:PagingToolbar runat="server" />
    Looking in the JavaScript debugger, it looks to me the problem is here:

    _load : Ext.data.Store.prototype.load,
    load : function (options) {
        if (this.warningOnDirty && this.isDirty()) {
                function (btn, text) {
                    if (btn == "yes") {
                        this.originalLoad(options); // <-- this is the line failing
            return this;
        return this._load(options);
    I've not studied the file fully, but just looking at the above snippet, I suspect that instead of calling this.originalLoad(options); it should be using this._load(options)?

    Last edited by Daniil; Jun 07, 2012 at 5:21 AM. Reason: [CLOSED]
  2. #2

    Thanks for the report. Fixed in SVN, revision #4071.
  3. #3
    Thanks for the fix. Looks good; you can mark as closed.

Similar Threads

  1. Editable Checkcolumn gives javascript error
    By Birgit in forum 2.x Help
    Replies: 2
    Last Post: Apr 19, 2012, 12:56 PM
  2. [CLOSED] Create Editable Grid from server side
    By Marcelo in forum 1.x Premium Help
    Replies: 2
    Last Post: Sep 15, 2011, 2:31 PM
  3. Replies: 2
    Last Post: Apr 20, 2010, 2:50 PM
  4. [CLOSED] [1.0] Store and paging server side
    By PoloTheMonk in forum 1.x Premium Help
    Replies: 1
    Last Post: Feb 02, 2010, 1:38 PM
  5. How to check if Form or Editable Grid is Dirty ?
    By n_s_adhikari@rediffmail.com in forum 1.x Help
    Replies: 1
    Last Post: Aug 31, 2009, 6:03 PM

Posting Permissions