Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapsing a group after reload on paging grid removes it due to a XTemplate error #1295

Closed
fabriciomurta opened this issue Mar 24, 2016 · 3 comments

Comments

@fabriciomurta
Copy link
Contributor

Reported on this thread: Grouping breaks when data is reloaded.

To reproduce the problem, it is necessary to:

  • perform a refresh/reload/load when a particular group is collapsed
  • expand that group and perform an additional refresh/reload
  • try to collapse the group.

At this point it will then vanish with the warning message below:
[W] XTemplate evaluation exception: Unable to get property 'get' of undefined or null reference

The simplified test case to reproduce the issue is this:

<%@ Page Language="C#" %>

<script runat="server">
    private object TestData
    {
        get
        {
            var lst = new List<object>();

            for (int index = 0; index < 15; index++)
            {
                lst.Add(new object[]
                {
                    index,
                    "Name - " + index,
                    index % 2 == 0 ? "raphael" : "saldanha"
                });
            }

            return lst;
        }
    }
</script>
<!DOCTYPE html>
<html>
<head runat="server">
    <title>GroupBreak on Ext.NET 4</title>
</head>
<body>
    <ext:ResourceManager Theme="Crisp" ScriptMode="Debug" runat="server" />

    <ext:GridPanel ID="gp1" Title="Ext.Net" Width="700" Height="500" Region="Center" runat="server">
        <Features>
            <ext:Grouping runat="server" HideGroupedHeader="true" StartCollapsed="true" GroupHeaderTplString='{columnName}: {name} - Count: {rows.length}' />
        </Features>
        <Store>
            <ext:Store ID="st1" AutoLoad="true" GroupField="Owner" Data="<%# TestData %>" runat="server">
                <Model>
                    <ext:Model IDProperty="ID" runat="server">
                        <Fields>
                            <ext:ModelField Name="ID" Type="String" />
                            <ext:ModelField Name="Name" Type="String" />
                            <ext:ModelField Name="Owner" Type="String" />
                        </Fields>
                    </ext:Model>
                </Model>
            </ext:Store>
        </Store>
        <ColumnModel runat="server">
            <Columns>
                <ext:Column Text="ID" DataIndex="ID" runat="server" />
                <ext:Column Text="Name" Flex="1" DataIndex="Name" runat="server" />
                <ext:Column Text="Owner" DataIndex="Owner" runat="server" />
            </Columns>
        </ColumnModel>
        <BottomBar>
            <ext:PagingToolbar runat="server" />
        </BottomBar>
    </ext:GridPanel>
</body>
</html>
@fabriciomurta
Copy link
Contributor Author

This was reproduced on v3 and v4!

@DaniilVeriga
Copy link

This Sencha bug report appears to be the case.
https://www.sencha.com/forum/showthread.php?303384

I could not reproduce it with Ext.NET 4.1.0 (ExtJS 6.0.2).

As for v3, it is going to be fixed if we ever upgrade to ExtJS 5.1.3. Closing the issue and adding review-after-extjs-upgrade which is only related to v3. It is not needed to be reviewed for any v4 upgrades.

@fabriciomurta
Copy link
Contributor Author

(I didn't unassign @DaniilVeriga, GitHub did it by itself. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants