[CLOSED] Gridpanel Grouping in v 2.3

  1. #1

    [CLOSED] Gridpanel Grouping in v 2.3

    Hi team,
    We have updated the dll's from v2.2 to v2.3,
    After updation we found an issue in grouping gridpanel
    We allowed multiple columns in the grid as groupable, so that user can group columns as per their wish,
    It is showing empty grid when we are not giving groupfield property to store.
    How can we solve(with out giving groupfield) this issue?

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Gridpanel.aspx.cs" Inherits="Ext2._2Practice.Gridpanel" %>
    
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html>
    
    
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <script runat="server">
            public class Company
            {
                public Company(int id, string name, int price, int change, int pctChange)
                {
                    this.ID = id;
                    this.Name = name;
                    this.Price = price;
                    this.Change = change;
                    this.PctChange = pctChange;
                }
    
    
                public int ID { get; set; }
                public string Name { get; set; }
                public int Price { get; set; }
                public int Change { get; set; }
                public int PctChange { get; set; }
            }
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!X.IsAjaxRequest)
                {
                    this.Store1.DataSource = new List<Company> 
                { 
                    new Company(0, "3m Com", 50, 5,20),
                    new Company(1, "Alcoa Inc", 50, 5,10),
                    new Company(2, "Altria Group Inc", 60, 5,10),
                    new Company(3, "American Express Company", 60, 15,10),
                    new Company(4, "American International Group, Inc.", 70, 5,20),
                    new Company(5, "AT&T Inc.", 80, 5,10),
                    new Company(6, "Boeing Co.", 80, 5,10),
                    new Company(7, "Caterpillar Inc.", 80, 15,10),
                    new Company(8, "Citigroup, Inc.", 50, 5,10),
                    new Company(9, "E.I. du Pont de Nemours and Company", 60, 5,10),
                    new Company(10, "Exxon Mobil Corp", 60,  15,10),
                    new Company(11, "General Electric Company", 70,  5,10),
                    new Company(12, "General Motors Corporation", 60, 5,10),
                    new Company(13, "Hewlett-Packard Co.", 60,  15,10),
                    new Company(14, "Honeywell Intl Inc", 50,  5,10),
                    new Company(15, "Intel Corporation", 80,  15,10),
                    new Company(16, "International Business Machines", 80,  5,20),
                    new Company(17, "Johnson & Johnson", 80,  15,10),
                    new Company(18, "JP Morgan & Chase & Co", 80,  5,10),
                    new Company(19, "McDonald\"s Corporation", 50,  5,10),
                    new Company(20, "Merck & Co., Inc.", 60,  5,10),
                    new Company(21, "Microsoft Corporation", 70,  15,20),
                    new Company(22, "Pfizer Inc", 70,  5,10),
                    new Company(23, "The Coca-Cola Company", 70,  15,10),
                    new Company(24, "The Home Depot, Inc.", 904,  5,10),
                    new Company(25, "The Procter & Gamble Company", 90, 5,10),
                    new Company(26, "United Technologies Corporation", 50,  5,20),
                    new Company(27, "Verizon Communications", 60,  15,10),
                    new Company(28, "Wal-Mart Stores, Inc.", 60,  15,20),
                };
    
    
                    this.Store1.DataBind();
    
    
    
    
                }
            }
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Store ID="Store1" runat="server" PageSize="10">
                <Model>
                    <ext:Model runat="server" IDProperty="ID">
                        <Fields>
                            <ext:ModelField Name="ID" />
                            <ext:ModelField Name="Name" />
                            <ext:ModelField Name="Price" />
                            <ext:ModelField Name="Change" />
                            <ext:ModelField Name="PctChange" />
                        </Fields>
                    </ext:Model>
                </Model>
            </ext:Store>
            <ext:GridPanel
                ID="GridPanel1"
                runat="server"
                StoreID="Store1"
                Title="Company List"
                Collapsible="true"
                Width="600"
                Height="750">
                <ColumnModel runat="server">
                    <Columns>
                        <ext:Column runat="server" Text="Company" Width="160" DataIndex="Name" Resizable="false" MenuDisabled="true"
                            Fixed="true" Flex="1" />
                        <ext:Column runat="server" Text="Price" Width="75" Groupable="true" DataIndex="Price">
                            <Renderer Format="UsMoney" />
                        </ext:Column>
                        <ext:Column runat="server" Text="Change" Width="75" Groupable="true" DataIndex="Change">
                        </ext:Column>
                        <ext:Column runat="server" Text="Change" Width="75" Groupable="true" DataIndex="PctChange">
                        </ext:Column>
                    </Columns>
                </ColumnModel>
                <Features>
                    <ext:Grouping ID="grpGrid" runat="server" HideGroupedHeader="false" StartCollapsed="true"
                        GroupHeaderTplString='{name} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})' />
                </Features>
            </ext:GridPanel>
        </form>
    </body>
    </html>
    Please contact, If you need more clarification.

    Thank you
    Mohan
    Last edited by Daniil; Oct 22, 2013 at 2:42 PM. Reason: [CLOSED]
  2. #2
    Hello!

    Try to set StartCollapsed to "False":

    <ext:Grouping ID="grpGrid" runat="server" HideGroupedHeader="false"StartCollapsed="False"
        GroupHeaderTplString='{name} ({rows.length} Item{[values.rows.length > 1 ? "s" : ""]})' />

Similar Threads

  1. [CLOSED] GridPanel Grouping
    By mcfromero in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 17, 2012, 3:39 PM
  2. GridPanel Grouping
    By Timothy in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 26, 2009, 8:40 AM
  3. [CLOSED] Remote grouping or grouping summary for GridPanel
    By jchau in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 08, 2009, 10:23 PM
  4. GridPanel Grouping + Checkbox
    By davidhoyt in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Dec 23, 2008, 3:51 PM
  5. [FIXED] [V0.6] GridPanel Grouping
    By Timothy in forum Bugs
    Replies: 2
    Last Post: Sep 06, 2008, 4:14 PM

Tags for this Thread

Posting Permissions