[CLOSED] GroupCommand on a row with an ampersand in the name...

  1. #1

    [CLOSED] GroupCommand on a row with an ampersand in the name...

    Hi,

    I have a group view defined as follows

                <ext:GroupingView  
                    ID="GroupingView1"
                    HideGroupedColumn="true"
                    EnableGroupingMenu="false"
                    runat="server" 
                    ForceFit="true"
                    StartCollapsed="true"
                    GroupTextTpl='<span id="ColorCode-{[values.rs[0].data.ColorCode]}"></span>{text} ({[values.rs.length]} {[values.rs.length > 1 ? "UNITS" : "UNIT"]})'
                    EnableRowBody="true">
                </ext:GroupingView>
    <GroupCommand Handler="debugger;" />
    and a group command (as above)...

    Whenever the data in the grouping column (which is the name of a facility), contains an ampersand '&', if you click on any command in that group row and break into the debugger there is no data in the records parameter. There IS data for any other row (without an ampersand in the title). Just not that row.

    Do you need me to produce a full working example? You will be able to see this if you run your 'Group Command' demo, change the name of one of the group fields to 'Mostly & Shady' for example and then click on the group command and you'll see the number of records is zero.

    We are running the latest build of Ext.Net Release 1.

    Thanks
    Last edited by Daniil; Jul 25, 2011 at 8:55 AM. Reason: [CLOSED]
  2. #2
    Hi,

    Thanks for the bug report. We are investigating.

    Here is the simple sample to reproduce. Just click on the group buttons.

    Example

    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.GridPanel1.Store.Primary;
                store.DataSource = new object[] 
                { 
                    new object[] {"test11 & test", "test121", "test131"},
                    new object[] {"test11 & test", "test122", "test132"},
                    new object[] {"test11 & test", "test123", "test133"},
                    new object[] {"test21", "test221", "test231"},
                    new object[] {"test21", "test222", "test232"},
                    new object[] {"test21", "test223", "test233"},
                    new object[] {"test31", "test321", "test331"},
                    new object[] {"test31", "test322", "test332"},
                    new object[] {"test31", "test323", "test333"}
                };
                store.DataBind();
            }
        }
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.Net Example</title>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:GridPanel ID="GridPanel1" runat="server" AutoHeight="true">
                <Store>
                    <ext:Store runat="server" GroupField="test1">
                        <Reader>
                            <ext:ArrayReader>
                                <Fields>
                                    <ext:RecordField Name="test1" />
                                    <ext:RecordField Name="test2" />
                                    <ext:RecordField Name="test3" />
                                </Fields>
                            </ext:ArrayReader>
                        </Reader>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column Header="Test1" DataIndex="test1" />
                        <ext:Column Header="Test2" DataIndex="test2" />
                        <ext:Column Header="Test3" DataIndex="test3" />
                        <ext:CommandColumn Hidden="true">
                            <GroupCommands>
                                <ext:GridCommand Icon="Accept" CommandName="Test" />
                            </GroupCommands>
                        </ext:CommandColumn>
                    </Columns>
                </ColumnModel>
                <View>
                    <ext:GroupingView runat="server" />
                </View>
                <Listeners>
                    <GroupCommand Handler="alert(records.length);" />
                </Listeners>
            </ext:GridPanel>
        </form>
    </body>
    </html>
  3. #3
    The bug ticket has been created:
    https://extnet.lighthouseapp.com/pro...gs/tickets/164

    The fix has been added to SVN, revision #3662.

    Please update and re-test.

    Thanks again for the report.

Similar Threads

  1. [CLOSED] Gridpanel GroupCommand Example
    By deejayns in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Dec 31, 2011, 8:23 AM
  2. groupcommand handler parameters
    By wp_joju in forum 1.x Help
    Replies: 4
    Last Post: Feb 16, 2011, 9:22 AM
  3. Usage of ampersand (& <> &) in grid editors
    By plykkegaard in forum Bugs
    Replies: 3
    Last Post: May 28, 2009, 4:44 AM

Posting Permissions