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 8963113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:17:17+00:00 2026-06-15T16:17:17+00:00

I am working on jqgrid with ASP.NET WEB API. I want to add two

  • 0

I am working on jqgrid with ASP.NET WEB API.

I want to add two rows in the footer of jqgrid.

So a little search on the net brought me to this link (2010) which says “It is not possible”, I am thinking as the answer is of 2010, may be by now some thing / some workaround may have been made possible for this.

What do I want to show in footer ?

I want to show two rows

  • Total for data preset in current page
  • Grand total for data present in all of the pages

I am able to pass the data and read the data, the question is how to use this data and create two footer rows in jqgrid.

Any thoughts ?

  • 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-15T16:17:18+00:00Added an answer on June 15, 2026 at 4:17 pm

    I found the question interesting, so I created the demo which demonstrates one from the possible implementation of two-rows footer:

    enter image description here

    The main idea is to add the second row in the table where the standard footer already exist. To eliminate possible problems with other parts of jqGrid code I replaced footrow class name in the custom row to myfootrow. To have the same CSS settings for the second footer as the original tooter has I included the copy of .ui-jqgrid tr.footrow td from ui.jqgrid.css with the same definitions for .ui-jqgrid tr.myfootrow td:

    .ui-jqgrid tr.myfootrow td {
        font-weight: bold;
        overflow: hidden;
        white-space:nowrap;
        height: 21px;
        padding: 0 2px 0 2px;
        border-top-width: 1px;
        border-top-color: inherit;
        border-top-style: solid;
    }
    

    The full code you will find below

    footerrow: true,
    loadComplete: function () {
        var $this = $(this),
            sum = $this.jqGrid("getCol", "amount", false, "sum"),
            $footerRow = $(this.grid.sDiv).find("tr.footrow"),
            localData = $this.jqGrid("getGridParam", "data"),
            totalRows = localData.length,
            totalSum = 0,
            $newFooterRow,
            i;
    
        $newFooterRow = $(this.grid.sDiv).find("tr.myfootrow");
        if ($newFooterRow.length === 0) {
            // add second row of the footer if it's not exist
            $newFooterRow = $footerRow.clone();
            $newFooterRow.removeClass("footrow")
                .addClass("myfootrow ui-widget-content");
            $newFooterRow.children("td").each(function () {
                this.style.width = ""; // remove width from inline CSS
            });
            $newFooterRow.insertAfter($footerRow);
        }
        $this.jqGrid("footerData", "set", {invdate: "Total (page):", amount: sum});
    
        // calculate the value for the second footer row
        for (i = 0; i < totalRows; i++) {
            totalSum += parseInt(localData[i].amount, 10);
        }
        $newFooterRow.find(">td[aria-describedby=" + this.id + "_invdate]")
            .text("Grand Total:");
        $newFooterRow.find(">td[aria-describedby=" + this.id + "_amount]")
            .text($.fmatter.util.NumberFormat(totalSum, $.jgrid.formatter.number));
    }
    

    In the code I set additional information in columns invdate and amount of the footer.

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

Sidebar

Related Questions

I'm working on replacing an existing web grid in an ASP.NET web application, with
I have a problem with jqGrid and ASP.NET MVC framework. Namely, jqGrid is working
I am using Jqgrid 3.6 beta version with asp.net and i wanna add dynamic
I am working on Jqgrid in ASP.NET MVC. I have managed to have a
I am using jqgrid with ASP.NET MVC 3. I want to hide the sub
So I've got basic example of jqgrid working in ASP.NET MVC, the javascript looks
I'm new to web development and working on my first ASP.NET MVC 3 app.
I'm working on my first ASP.NET MVC 3 application and what I want to
Here's a simple question. I have a jqGrid that's working great but I want
Yesterday I was playing with jQGrid plugin and ASP.NET. Everything turned out well, my

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.