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

    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.

    Moreover, if you're interested in managing your electricity bills online, FESCO offers a convenient solution. Visit the Fesco bill website to effortlessly access and oversee your bills, enabling effective payment management.

    Feel free to reach out if you require additional support!

  • 0
    Offline posted

    To display only the sum total in the Summary feature of the grid, you can override the summary displays to include just the sum operand. Since you're using the Summary feature in a grid, you can customize the column settings to achieve this.

    Here's an example of how you can modify the column settings in your cshtml code snippet:

    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 specific column index, you can prevent all values from being included in the summaries, ensuring that only the sum total is displayed.

    For more detailed guidance on customizing the Summary feature in your grid, you can refer to the documentation provided by your grid component or framework.

    Additionally, if you're interested in managing your electricity bills online, you can easily do so through the FESCO website. Simply visit FESCO e-bill to access your bills conveniently and manage your payments effectively.

    Let me know if you need further assistance!



  • 460
    Offline posted

    Hello,

    I have been looking into your question and to achieve your summary requirements, you must handle the ColumnSettings property of the summary feature.

    features.Summaries().ShowSummariesButton(false).ShowDropDownButton(false).ColumnSettings(settings => { })

    You can then perform different settings for each individual column. You will handle all columns of the number data type or only some of them according to your requirements with their column cases and you will handle the SummaryOperands property.

    settings.ColumnSetting().ColumnKey("Salary").SummaryOperands(so => { })

    With this property you can set only certain sum operands to be displayed in your grid for the specified column. By adding a SummaryOperand for the column and using the Type property you will pass the SummaryFunction.Sum operand and finally activate it with Active(true).

    so.SummaryOperand().Type(SummaryFunction.Sum).Active(true);

    This way you will enable only a certain summarization operand for a certain column.

    features.Summaries().ShowSummariesButton(false).ShowDropDownButton(false).ColumnSettings(settings =>
    {
              settings.ColumnSetting().ColumnKey("Salary").SummaryOperands(so =>
    
                         {
                                 so.SummaryOperand().Type(SummaryFunction.Sum).Active(true);
                         });
    })

    The described scenario could be observed here:

     

    In addition, I have prepared small sample illustrating this behavior which could be found attached here. Please test it on your side and let me know how it behaves.

    8055.igGridSumSummary.zip

    If you require any further assistance on the matter, please let me know.

    Regards,

    Georgi Anastasov

    Entry Level Software Developer

    Infragistics