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

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

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

Comments

Projects
None yet
2 participants
@DaniilVeriga

DaniilVeriga commented May 12, 2016

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

This comment has been minimized.

Show comment
Hide comment
@fabriciomurta

fabriciomurta Feb 7, 2017

Contributor

@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.

Contributor

fabriciomurta commented Feb 7, 2017

@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 added a commit to extnet/Ext.NET.Examples that referenced this issue Feb 7, 2017

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.

@fabriciomurta fabriciomurta modified the milestones: 4.2.1, 4.2.0 Feb 7, 2017

@fabriciomurta

This comment has been minimized.

Show comment
Hide comment
@fabriciomurta

fabriciomurta Feb 7, 2017

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.

Contributor

fabriciomurta commented Feb 7, 2017

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