[FIXED] [#350] Buffered GridPanel throws an error when inserting records

  1. #1

    [FIXED] [#350] Buffered GridPanel throws an error when inserting records

    Hi,

    I have a Buffered GridPanel with an 'Add Record' button on the top and 5000 records loaded.

    When I click 'Add Record', a new Record will be inserted at index '0' of the store.

    now, If I scroll down the last record on the grid and click 'Add Record', I get the error -
    SCRIPT5007: Unable to get property 'insertSibling' of undefined or null reference
    Below is the code to replicate the issue -

    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
            If Not Me.IsPostBack Then
                Dim store As Store = Me.GridPanel1.GetStore()
    
    
                Dim data As Object() = New Object(4999) {}
    
    
                For i As Integer = 0 To 4999
                    data(i) = New Object() {"test" & i}
                Next
                store.DataSource = data
                store.DataBind()
            End If
        End Sub
    </script>
    <!DOCTYPE html>
    <html>
    <head id="Head1" runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <script type="text/javascript">
            function addRecord() {
                var store = this.up('gridpanel').getStore();
    
    
                var newRecord = store.model.create();
    
    
                store.insert(0, newRecord);
            }
        </script>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:GridPanel ID="GridPanel1" runat="server" Height="400">
            <TopBar>
                <ext:Toolbar runat="server">
                    <Items>
                        <ext:Button ID="btnAddRecord" runat="server" Icon="Add" Text="Add Record">
                        <listeners>
                                <Click Fn="addRecord" />
                            </listeners>
                    </ext:Button>
                    </Items>
                    
                </ext:Toolbar>
            </TopBar>
            <Store>
                <ext:Store ID="Store1" runat="server" PageSize="5000">
                    <Model>
                        <ext:Model ID="Model1" runat="server">
                            <Fields>
                                <ext:ModelField Name="test" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel ID="ColumnModel1" runat="server">
                <Columns>
                    <ext:Column ID="Column1" runat="server" Text="Test" DataIndex="test" />
                </Columns>
            </ColumnModel>
            <Plugins>
                <ext:BufferedRenderer ID="BufferedRenderer1" runat="server" />
            </Plugins>
            <Features>
                <ext:GridFilters ID="GridFilters1" runat="server" Local="true">
                    <Filters>
                        <ext:StringFilter DataIndex="test" />
                    </Filters>
                </ext:GridFilters>
            </Features>
        </ext:GridPanel>
        </form>
    </body>
    </html>
    Last edited by fabricio.murta; Aug 02, 2018 at 6:58 PM.
  2. #2
    Hi @stratadev,

    Thank you for the report.

    Reported to Sencha.
    http://www.sencha.com/forum/showthread.php?272367
  3. #3
    Sencha opened a bug.

    We created an Issue to track the defect.
    https://github.com/extnet/Ext.NET/issues/350
  4. #4
    This seems to have been fixed for some time now, and we didn't catch it while checking the issues fixed by Sencha.

    So well, good news, issue as good as fixed!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 1
    Last Post: Apr 17, 2013, 9:09 AM
  2. Replies: 4
    Last Post: Mar 12, 2013, 12:53 AM
  3. Replies: 3
    Last Post: Oct 10, 2012, 8:58 AM
  4. Replies: 1
    Last Post: Aug 12, 2009, 11:39 AM
  5. Issue with inserting multiple records in grid
    By n_s_adhikari@rediffmail.com in forum 1.x Help
    Replies: 1
    Last Post: Jul 27, 2009, 5:27 PM

Posting Permissions