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

  • Home
  • SEARCH
  • 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 6898413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:17:35+00:00 2026-05-27T07:17:35+00:00

ok, here is the thing … I’ve this jqGrid and what I need is

  • 0

ok, here is the thing … I’ve this jqGrid and what I need is to sumarize showed data. This jqGrid has definitions as shown bellow

jQuery("#myGrid").jqGrid
    { 
        url:'/loadGrid.php?q=2', 
        datatype: "xml", 
        colNames:[...], 
        colModel:[...], 
        // some other params.
        footerrow : true, 
        **userDataOnFooter : true,** // it should show footer's custom information.
        altRows : true
    }).navGrid('#pagerGrid',{add:false,edit:false,del:false, search:false}); 

and loadGrid.php has the next structure shown bellow

$page = $_GET['page']; // get the requested page 
$limit = $_GET['rows']; // get how many rows we want to have into the grid 
$sidx = $_GET['sidx']; // get index row - i.e. user click to sort 
$sord = $_GET['sord']; // get the direction 

// here goes connextion to database and data collection
...
//

if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) 
{
    header("Content-type: application/xhtml+xml;charset=utf-8"); 
} 
else 
{
    header("Content-type: text/xml;charset=utf-8");
}

$et = ">";
echo "<?xml version='1.0' encoding='utf-8'?$et\n";
echo "<rows>";
echo "<page>$current</page>";
echo "<total>$total</total>";
echo "<records>$records</records>";

// and data population
foreach( $data as $key => $value ) 
{ 
    $ff = $value['field_1'];
    echo "<row id='". $ff."'>";
    // $ff = $value['field_1'];
    echo "<cell> <![CDATA[" . $ff . "]]></cell>";
    $ff = $value['field_2'];
    echo "<cell> <![CDATA[" . $ff . "]]></cell>";
    $ff = $value['field_3'];
    echo "<cell> <![CDATA[" . $ff . "]]></cell>";
    // ... and so on whith all column definitions.
    echo "</row>";
}

echo "</rows>";

This works but the problems becomes when show the grid. In the footer of the grid I only see an empty row. If I put some sumarized data and try to send to the page it doesn’t show anything. So, What I need to know is how should I pass userdata for the page to read it.

I’d already read information from jqGrid whiki and said something like
“userData: This array contain custom information from the request. Can be used at any time.” but I cann’t figure how to pass this information to #myGrid.
Does somebody has any idea about it? Any help will strongly appreciated.

  • 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-27T07:17:36+00:00Added an answer on May 27, 2026 at 7:17 am

    Format of user data in XML can looks a little strange at the first look, but it is clear documented here. You should add some XML elements in the form

    ...
    <page>1</page>
    <userdata name="gridColumName1">value1 in the summary</userdata>
    <userdata name="gridColumName2">value2 in the summary</userdata>
    ...
    

    You should use the same column names (‘gridColumName1’, ‘gridColumName2’) like you as defined in the name property of columns definitions in the colModel.

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

Sidebar

Related Questions

I'm using this: http://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_toggle the thing here is that i change the button to
Here is the thing. Right now I have this e-commerce web site where people
Here's the thing: In my Qt4.6-Project, I use a SQLite-Database. This database shouldn't be
Here the thing, other PDO works well, but this one doesn't. I have tried
I have this thing here var filelist = new List< KeyValuePair< string, string>>(); and
And what if you want to autocomplete passwords? I am using similar thing here...
Here's the thing: object[] arrayText = new object[1]; if (arrayText[1] == null) { MessageBox.Show(Is
Here is the thing. I currently have a tabBar controller, with several navigation controllers
Here's the thing. I use ' Highlight.js ' (a javascript-based automatic syntax highlighter) to
Here's the thing. I have an interface, and I would to put the Include

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.