GridPanel with Grouping, CommandColumn with GroupCommands, CellEditing causes a JavaScript error after editing #1330

Closed
DaniilVeriga opened this Issue May 12, 2016 · 2 comments

Projects

None yet

2 participants

@DaniilVeriga
DaniilVeriga commented May 12, 2016 edited

A related forum post.

Steps:

  • Double click any cell of the Test1 column to enter editing mode
  • Type something and press Enter
  • A JavaScript error occurs: Cannot read property 'groupId' of undefined in the standardGroupFn method

Test Case

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

<script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!X.IsAjaxRequest)
        {
            Store store = this.GridPanel1.GetStore();
            store.DataSource = new object[] 
            { 
                new object[] { "group1", "1", "1" },
                new object[] { "group1", "11", "11" },
                new object[] { "group1", "111", "111" },
                new object[] { "group2", "2", "2" },
                new object[] { "group2", "22", "22" },
                new object[] { "group2", "222", "222" }
            };
        }
    }
</script>

<!DOCTYPE html>

<html>
<head runat="server">
    <title>Ext.NET v4 Example</title>
</head>
<body>
    <form runat="server">
        <ext:ResourceManager runat="server" />

        <ext:GridPanel ID="GridPanel1" runat="server" Height="350">
            <Store>
                <ext:Store runat="server" GroupField="groupId">
                    <Model>
                        <ext:Model runat="server">
                            <Fields>
                                <ext:ModelField Name="groupId" />
                                <ext:ModelField Name="test1" />
                                <ext:ModelField Name="test2" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel runat="server">
                <Columns>
                    <ext:Column runat="server" Text="GroupId" DataIndex="groupId" />

                    <ext:Column runat="server" Text="Test1" DataIndex="test1">
                        <Editor>
                            <ext:TextField runat="server" />
                        </Editor>
                    </ext:Column>

                    <ext:Column runat="server" Text="Test2" DataIndex="test2" />

                    <ext:CommandColumn runat="server" Hidden="true">
                        <GroupCommands>
                            <ext:GridCommand Icon="Accept" CommandName="someCommand" />
                        </GroupCommands>
                    </ext:CommandColumn>
                </Columns>
            </ColumnModel>
            <Features>
                <ext:Grouping runat="server" />
            </Features>
            <Plugins>
                <ext:CellEditing />
            </Plugins>
        </ext:GridPanel>
    </form>
</body>
</html>
@DaniilVeriga DaniilVeriga changed the title from GridPanel with Grouping, CommandColumn with a GroupCommand, CellEditing causes a JavaScript error after editing to GridPanel with Grouping, CommandColumn with GroupCommands, CellEditing causes a JavaScript error after editing May 12, 2016
@DaniilVeriga DaniilVeriga added this to the 4.2.0 milestone May 12, 2016
@DaniilVeriga DaniilVeriga self-assigned this May 12, 2016
@fabriciomurta
Contributor
fabriciomurta commented Feb 7, 2017 edited

@DaniilVeriga has just contributed with a new test case where the fix applied here breaks -- and also with the way to "fix the fix".

The test case would be at Drag Drop Custom Logic. The "rules" of dropping nodes are ignored due to this problem so any node can be dropped anywhere.

The fix will be applied to extnet/Premium/master.

@fabriciomurta fabriciomurta reopened this Feb 7, 2017
@fabriciomurta fabriciomurta referenced this issue in extnet/Ext.NET.Examples Feb 7, 2017
Open

Custom Tree Drop logic rules are ignored #11

@fabriciomurta fabriciomurta added a commit to extnet/Ext.NET.Examples that referenced this issue Feb 7, 2017
@fabriciomurta fabriciomurta Adds a workaround for the drop rules being ignored.
Daniil has contributed with the fix after he found it happening on the
code. As the fix from Ext.NET DLL will only be available after next
public release, this workaround was applied based on his proposed
solution.

Related github issues: #11.
This was a side effect of extnet/Ext.NET#1330.
b8a3935
@fabriciomurta fabriciomurta modified the milestone: 4.2.1, 4.2.0 Feb 7, 2017
@fabriciomurta
Contributor

The solution suggested by @DaniilVeriga was applied to the code and fixes the affected example in Examples explorers. Milestone pushed for Ext.NET 4.2.1 (or newer) release.

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