[CLOSED] Summary Column Issue

  1. #1

    [CLOSED] Summary Column Issue

    Hello,

    I have used summary Column.

    Now through code behind I am adding the records using following statement
    MyStore.Add(customStoneList);
    While Adding first time it calculates summary, but on second request while add, summary not affected.

    For example I am adding 5 records in store it displays proper summary. While I am adding another 2 records then summary should calculate again but its not calculating.

    Thanks
    Shailesh
    Last edited by Daniil; May 07, 2013 at 4:43 AM. Reason: Please use [CODE] tags, [CLOSED]
  2. #2
    Hi Shailesh,

    Thank you for the report, but I can't reproduce with the test case below.

    Please provide your test case.

    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.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { 1 },
                    new object[] { 2 },
                    new object[] { 3 }
                };
                store.DataBind();
            }
        }
    
        protected void Add(object sender, DirectEventArgs e)
        {
            Store store = this.GridPanel1.GetStore();
    
            store.Add(new object[] 
            { 
                new object[] { 4 },
                new object[] { 5 }
            });
        }
    
        protected void AddMore(object sender, DirectEventArgs e)
        {
            Store store = this.GridPanel1.GetStore();
    
            store.Add(new object[] 
            { 
                new object[] { 6 },
                new object[] { 7 }
            });
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    
        <style>
            .x-grid-row-summary .x-grid-cell-inner {
                font-weight      : bold;
                font-size        : 11px;
                background-color : #f1f2f4;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Button runat="server" Text="Add" OnDirectClick="Add" />
            <ext:Button runat="server" Text="Add more" OnDirectClick="AddMore" />
    
            <ext:GridPanel ID="GridPanel1" runat="server">
                <Store>
                    <ext:Store runat="server">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="test" Type="Int" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Columns>
                        <ext:SummaryColumn runat="server" Text="Test" DataIndex="test" SummaryType="Sum" />
                    </Columns>
                </ColumnModel>
                <Features>
                    <ext:Summary runat="server" />
                </Features>
            </ext:GridPanel>
        </form>
    </body>
    </html>
  3. #3
    Hi Danil,

    Have you noticed here, after click on add or add more button, the summary not reflected , it remains "6" only, That was my issue.

    Thanks
    Shailesh
  4. #4
    I can't reproduce it using the test case above and the SVN trunk.
  5. #5
    Danil,

    What do you mean by SVN trunk?

    Thanks
    Shailesh
  6. #6
    I mean that I use the Ext.NET sources from the trunk.
    http://svn.ext.net/premium/trunk

    What Ext.NET sources are you using?

Similar Threads

  1. Replies: 17
    Last Post: Apr 27, 2016, 1:06 AM
  2. Grid Panel Summary Column
    By Mina in forum 1.x Help
    Replies: 3
    Last Post: Jan 02, 2012, 10:03 AM
  3. Grid Column Summary Plugin?
    By huzzy143 in forum 1.x Help
    Replies: 10
    Last Post: Aug 10, 2011, 6:19 PM
  4. [CLOSED] summary column for gridpanel?
    By leon_tang in forum 1.x Premium Help
    Replies: 4
    Last Post: Feb 25, 2011, 9:01 AM
  5. Autowrap Grouping Summary Column
    By sachin.munot in forum 1.x Help
    Replies: 1
    Last Post: Nov 23, 2009, 2:04 AM

Posting Permissions