Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8079715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:11:49+00:00 2026-06-05T16:11:49+00:00

This is my first post in this forum, so please, be patient with me.

  • 0

This is my first post in this forum, so please, be patient with me.

I need to set my summary to show the sum of all rows in my grid, even the rows that are inside other pages – the absolute sum of values.

I was searching for it, and I saw a lot of people with this problem, so I don’t think it is a problem with my code. It sounds more like a design in the grouping mechanism itself, otherwise I don’t know.

But, to be clear, I think I need to make a call to server side to get the sum from there, is this possible? If so, how should I do it with json?

I was thinking about using the formatter option, but then it is triggered line by line, and I don’t think this is the idea because the sum will come entire in the first call.

Any suggestions?

Thanks !!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:11:51+00:00Added an answer on June 5, 2026 at 4:11 pm

    You can define a custom summaryType function to display your sum. According to the documentation for summaryType:

    The option can be defined as function. If defined we pass three parameters to it – the current value, the name and the record object. The function should return value. Note that this value will be used again for the group value until it changes.

    For example, you could retrieve a totalSumRecord when the page is loaded – it would be a bad idea to make an AJAX call directly from the formatter – and then just display the appropriate value in the formatter:

    function myCustomSummary(val, name, record) {
        return totalSumRecord[name];
    }
    
    jQuery("#grid").jqGrid({ 
      ...
      colModel : [
         {..},
         {name:'myColumn',
          index:'myColumn', 
          width:80, 
          align:"right", 
          sorttype:'number',
          formatter:'number',
          summaryType:myCustomSummary},
         ...
      ],
      ...
    });
    

    Update

    There is a bug in jqGrid 4.4 where functions are not allowed as a summary type. If this affects you, here is the fix.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first post on this forum (so please be gentle ) I'm
This is my first post in any forum so please bear with me. I
This is my first post on stackoverflow, so please excuse me if my question
This is my first post here. I have a problem. I need to take
This is my first post on Stack, so please bear with me if I
this is my first post on this website, but I'm all the time getting
This is my first post to Stack Overflow so please forgive me if I
Hi this is my first post here hope you all are well. So Im
This is my first post to this forum, so if I screw something up,
It's my very first post on this forum. I have stuck with the Microsoft

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.