[CLOSED] how to get SummaryColumn's summary value from directEvent

  1. #1

    [CLOSED] how to get SummaryColumn's summary value from directEvent

    <ext:SummaryColumn SummaryType="Sum" ID="sc_jf" runat="server" Flex="1" Text="借方金额" DataIndex="Jfsl">
                                            <Renderer Handler="if(value!=null)return value +'元';" />
                                            <SummaryRenderer Handler="if(value!=0)return value +'元';" />
                                            <Editor>
                                                <ext:NumberField ID="NumberField3" runat="server"></ext:NumberField>
                                            </Editor>
                                        </ext:SummaryColumn>
                                        <ext:SummaryColumn SummaryType="Sum" ID="sc_df" runat="server" Flex="1" Text="贷方金额" DataIndex="Dfsl">
                                            <Renderer Handler="if(value!=null)return value +'元';" />
                                            <SummaryRenderer Handler="if(value!=0)return value +'元';" />
                                            <Editor>
                                                <ext:NumberField ID="NumberField4" runat="server"></ext:NumberField>
                                            </Editor>
                                        </ext:SummaryColumn>
            protected void e_savenew(object sender, DirectEventArgs e)
            {
                 // sc_jf.value?
                 X.Msg.Alert("ssss","dddfff").Show();
            }
    how to get SummaryColumn's value from directEvent ,
    such as one column value 10,another is 20,
    how to get the sum 30 from code behide?
    Last edited by Daniil; May 28, 2013 at 4:12 AM. Reason: [CLOSED]
  2. #2
    Hi @hdsoso,

    You should send it via a DirectEvent's ExtraParams.

    To access a summary data on client side, please use:
    App.Summary1.summaryRecord.data
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @hdsoso,

    You should send it via a DirectEvent's ExtraParams.

    To access a summary data on client side, please use:
    App.Summary1.summaryRecord.data
    return the json string in code behind.
    {"Jfsl":13,"Dfsl":3,"id":"gridview-1016-summary-record"}
    how to get jfsl's value ?
  4. #4
    You can deserialize it using JSON.Deserialize.
  5. #5
    I am using App.Summary1.summaryRecord.data and it is telling me:

    Unable to get property 'data' of undefined or null reference
  6. #6
    Quote Originally Posted by Tbaseflug View Post
    I am using App.Summary1.summaryRecord.data and it is telling me:

    Unable to get property 'data' of undefined or null reference
    Hi @Tbaseflug,

    Please provide a test case.

Similar Threads

  1. Grouping summary and summary in one grid
    By PetrSnobelt in forum 2.x Help
    Replies: 1
    Last Post: Apr 16, 2013, 9:59 AM
  2. Replies: 13
    Last Post: Jan 17, 2013, 5:27 AM
  3. [CLOSED] SummaryColumn Condition
    By vzx in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 14, 2013, 7:00 AM
  4. Replies: 2
    Last Post: Jun 07, 2012, 8:28 AM
  5. Replies: 1
    Last Post: Jun 09, 2011, 7:04 PM

Posting Permissions