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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:05:21+00:00 2026-05-16T10:05:21+00:00

I need help display data in the jqGrid footer row. This is my configuration

  • 0

I need help display data in the jqGrid footer row. This is my configuration on the Server. Notice the userdata = (Hours) line.

// Format the data for the jqGrid
        var jsonData = new
        {
            total = totalPages,
            page = page,
            records = totalRecords,                                 
            rows = (
                  from a in activities
                  select new
                  {
                      id = a.ActivityId,
                      cell = new string[] {
                      a.ActivityId.ToString(),                          
                      DateTime.Parse(a.Date.ToString()).ToShortDateString(),                          
                      a.Person.Name.ToString(),
                      a.ActivityName.ToString(),
                      a.Hours.ToString()                          
                    }
                  }).ToArray(),
            userdata = (Hours)
        };

        // Return the result in json
        return Json(jsonData, JsonRequestBehavior.AllowGet);

The userData amount that I need displayed in the footer is coming through in the JSON. I am using Fiddler to view it. Here is a screenshot of the fiddler view:

alt text http://shirey.technologyblends.com/Content/images/json.jpg

I need to display this value of “12” in the footer. This the HTML I am using to read the JSON:

        jQuery("#list").jqGrid({
        url: gridDataUrl + '?startDate=' + startDate.toJSONString() + '&endDate=' + endDate.toJSONString(),
        datatype: "json",
        mtype: 'GET',
        colNames: ['Activity ID', 'Date', 'Employee Name', 'Activity', 'Hours'],
        colModel: [
          { name: 'ActivityId', index: 'ActivityId', width: 40, align: 'left' },
          { name: 'Date', index: 'Date', width: 50, align: 'left' },
          { name: 'Person.Name', index: 'Person.Name', width: 100, align: 'left', resizable: true },
          { name: 'ActivityName', index: 'ActivityName', width: 100, align: 'left', resizable: true },
          { name: 'Hours', index: 'Hours', width: 40, align: 'left' }
          ],
        loadtext: 'Loading Activities...',
        multiselect: true,
        rowNum: 20,
        rowList: [10, 20, 30],
        imgpath: gridimgpath,
        height: 'auto',
        width: '700',
        pager: jQuery('#pager'),
        sortname: 'ActivityId',
        viewrecords: true,
        sortorder: "desc",
        caption: "Activities",
        footerrow: true, userDataOnFooter: true, altRows: true       
    }).navGrid('#pager', { search: true, edit: false, add: false, del: false, searchtext: "Search Activities" });
  • 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-05-16T10:05:22+00:00Added an answer on May 16, 2026 at 10:05 am

    Try to use following

    var jsonData = new {
        total = totalPages,
        page = page,
        records = totalRecords,
        rows = (
            from a in activities
            select new {
                id = a.ActivityId,
                cell = new string[] {
                    a.ActivityId.ToString(),
                    DateTime.Parse(a.Date.ToString()).ToShortDateString(),
                    a.Person.Name.ToString(),
                    a.ActivityName.ToString(),
                    a.Hours.ToString()
                }
            }).ToArray(),
            userdata = new {
                Hours = 12
            }
        };
    

    then the userdata part of the JSON data will be

      "userdata":{"Hours":12}
    

    which follows to displaying of the bold value 12 in the column Hours of the footer part of the jqGrid table.

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

Sidebar

Related Questions

Need help writing a script downloads data from google insight using c# this is
Need help with this please. I need to save some data in session to
I need me a little help. I need to use asynctask to display data
I need your help with display of some comma separated enteries from my database.
Need some help assigning a mouseover event to display some icons that start out
I need some help. I'm trying to display a field called SubmissionStatus in a
could you help me with styling of ItemTemplate for listbox. I need to display
Need help getting Ember-Data working with Zend Rest. At first, I'm familiar with Zend
I really need your help. I have a database with latitude and longitude data,
I need help sorting through some data. Say I type piz in a searchfield.

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.