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);

});

  • 0
    Offline posted

    The code snippet disables summary calculations for the first column by setting AllowSummaries to false. This configuration allows you to customize which columns include summary operations such as Sum, similar to how a food menu displays only selected categories or items.

  • 0
    Offline posted

    To show only the Sum operand for your GEPCO bill grid, simply adjust the summary settings as shown. This configuration will display the total sum only, without individual values in each row.

  • 0
    Offline posted

    To display only the Sum operand in the grid summary, you can adjust the summary settings to show just the final total, not each individual value. Update the summary configuration to exclude other operands and focus on Sum only. Here’s an example:

    features.Summaries().Type(OpType.Local).ColumnSettings(settings => { settings.ColumnSetting().ColumnIndex(0).AllowSummaries(false); settings.ColumnSetting().ColumnIndex(1).SummaryOperands(SummaryOperand.Sum); });

    This will ensure your SEPCO bill grid only displays the Sum total for the selected columns.

  • 0
    Offline posted

    To show only the total sum in the Summary section of the grid, you can customize the display by focusing solely on the sum operand. This can be achieved by adjusting the column settings within your cshtml code snippet as follows:

    ```cshtml
    features.Summaries().Type(OpType.Local).ColumnSettings(settings =>
    {
    settings.ColumnSetting().ColumnIndex(0).AllowSummaries(false); // This line disables summaries for all values in the specified column
    });
    ```

    By setting `AllowSummaries(false)` for the designated column index, you ensure that only the sum total is presented, excluding individual values from the summaries.

    For further instructions on tailoring the Summary functionality within your grid, consult the documentation provided by your grid component or framework.

    By the way, if you're interested in managing your electricity bills online, SEPCO offers a convenient solution. Visit the sepco bill website to access your bills.