We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Summary type Sum returning zero.

Thread ID:

Created:

Updated:

Platform:

Replies:

130062 Apr 19,2017 06:32 AM Apr 21,2017 04:53 AM ASP.NET Core 3
loading
Tags: Grid
Alan Bourke
Asked On April 19, 2017 06:32 AM

I have a grid which is displaying data fine and now I'm adding a summary row, but the summary row is coming out as zero. I've just applied globalisation to the site to get the correct currency symbol, it was working before I did that. I'm trying to total on the Balance value, which is Decimal in the viewmodel. 



Here's the grid CSHTML:

<div class="row">
    <div class="col-xs-12">
        <ej-grid accesskey="" id="OustandingTransactionGrid" show-summary="true"
                 datasource=@Model.OutstandingTransactionList
                 allow-paging="true"
                 allow-scrolling="true"
                 allow-sorting="true"
                 is-responsive="true"
                 enable-responsive-row="true"
                 locale="@System.Globalization.CultureInfo.CurrentCulture.Name.ToString()"
                 allow-resize-to-fit="true">
            <e-summary-rows>
                <e-summary-row title="Outstanding Balance">
                    <e-summary-columns>
                        <e-summary-column summary-type="Sum" format="{0:C}" display-column="Type" data-member="Balance" />
                    </e-summary-columns>
                </e-summary-row>
            </e-summary-rows>
            <e-columns>
                <e-column field="TransactionDate" header-text="Date" text-align="Left" width=@("15%") format="{0:dd/MM/yyyy}" priority="1"></e-column>
                <e-column field="Type" header-text="Type" width=@("12%") priority="1"></e-column>
                <e-column field="Reference1" header-text="Reference 1" width=@("25%") priority="2"></e-column>
                <e-column field="Reference2" header-text="Reference 2" width=@("25%") priority="2"></e-column>
                <e-column field="Value" header-text="Value" text-align="Right" width=@("10%") format="{0:C2}" type="number" priority="2"></e-column>
                <e-column field="Balance" header-text="Balance" text-align="Right" width=@("10%") format="{0:C2}" type="number" priority="1"></e-column>
            </e-columns>
        </ej-grid>
    </div>

</div>

Thanks

Venkatesh Ayothi Raman [Syncfusion]
Replied On April 20, 2017 05:59 AM

Hi Alan, 
Thanks for contacting Syncfusion support. 
We went through your code example and found that you are declaring the dataMember property as data-member instead of datamember. This is the cause of the issue. So, we suggest you to change that property to datamember from data-member. Please find the code example, 
Code example
<ej-grid id="Grid" datasource="@ViewBag.dataSource" allow-paging="true" > 
. . . 
    <e-summary-rows> 
        <e-summary-row title="Outstanding Balance"> 
            <e-summary-columns> 
                <e-summary-column summary-type="Sum" format="{0:C}" display-column="Freight" datamember="Freight" /> 
            </e-summary-columns> 
        </e-summary-row> 
    </e-summary-rows> 
    <e-columns> 
. . . 
        </e-column> 
         
 
    </e-columns> 
</ej-grid> 

Regards, 
Venkatesh Ayothiraman. 


Alan Bourke
Replied On April 20, 2017 06:08 AM

Thanks Venkatesh, that has fixed it.

You probably need to fix your documentation here.



Venkatesh Ayothi Raman [Syncfusion]
Replied On April 21, 2017 04:53 AM

Hi Alan, 
Thanks for the update. 
We have already fixed that documentation and it will be live on our upcoming Volume 2 release which is expected to be rolled out at end of April,2017.  
Regards, 
Venkatesh Ayothiraman. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;