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
255
igGrid Summaries
posted

Hi, 

I have a Grid and I have turned on grid summaries like this for columns. 

{
name: "Summaries",
compactRenderingMode: true,
resultTemplate: "{1}",
columnSettings: [
{
columnKey: "ABC",
allowSummaries: true,
summaryOperands:
{
type: "sum",
RowDisplayLabel: "Total"
}
},

I have 2 questions regarding the summaries. 

1. I want to disable the icons in the summary grid that let you do select the different kind of summary options. I don't want that icon.

2. I have a string column like "Name" as my first column, I want my footer / summary to show a static value ? "Total" or Sum there, how can I do that.

Parents
No Data
Reply
  • 1235
    posted

    Hello Hamza,

    You can disable the summary icon manually by inserting the following piece of code in, for example, the igGrid's rendered function:


    $("td.ui-widget-footer").unbind();
    $(".ui-iggrid-icon-summaries").css("visibility", "hidden");
    $(".ui-iggrid-summaries-footer-icon-container").css("pointer-events", "none");

    About your second issue you can specify what type of summary to be shown below a certain column by configuring summaryOperands, as in your code. This option takes an array of objects. For example:


    columnSettings: [
    {
        columnKey: "ABC",
        allowSummaries: true,
        summaryOperands: [
        {
            type: "count",
            rowDisplayLabel: "Total"
        }]
    }]

    I have attached a sample in reference to these issues.

    Please feel free to contact me if you have further questions.

    Regards,
    Ivaylo Hubenov
    Entry-level developer

    Sample.zip
Children