Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Summary Operands Asp.Net MVC Helper (.net core)
posted

Hi There,

I'm using the Summary feature of the grid, but i just want to display the Sum operand, not all of the values.

How can i go about doing this? IT's a basic sum operation on the grid fields. Can i override the summary displays to include just the Sum total?

Here's the code snipped in cshtml

features.Summaries().Type(OpType.Local).ColumnSettings(settings =>
{
settings.ColumnSetting().ColumnIndex(0).AllowSummaries(false);

});

Parents
No Data
Reply
  • 0
    Offline posted

    To display only the Sum operand in the grid summary and exclude other values, you can override the display settings in the grid configuration. The following snippet should help you modify the summary settings to show just the sum:

    1. Use the AllowSummaries(false) for other operations that you don't need.
    2. Customize the summary display to show only the Sum.
    3. Adjust the ColumnSettings to target the specific column you want the sum for.

    For HESCO bill https://www.hescoebill.pk/, if you're summarizing bill amounts from multiple users, the same concept could apply where only the total sum of all bills is displayed without listing each individual bill amount.

Children
No Data