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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:11:04+00:00 2026-05-12T06:11:04+00:00

I have everything working from the tutorial, replacing it with my data, but it

  • 0

I have everything working from the tutorial, replacing it with my data, but it is a hardcoded situation. For example, in the tutorial, which is what I have working, I have:

jQuery(document).ready(function(){ 
  jQuery("#list").jqGrid({
    url:'http://127.0.0.1/products/index.php/mystuff/test/1/5/productname/desc',
    datatype: 'xml',
    mtype: 'GET',
    colNames:['ProductID','title', 'description','price','tax','notes'],
    colModel :[ 
      {name:'invid', index:'invid', width:55}, 
      {name:'invdate', index:'invdate', width:90}, 
      {name:'amount', index:'amount', width:80, align:'right'}, 
      {name:'tax', index:'tax', width:80, align:'right'}, 
      {name:'total', index:'total', width:80, align:'right'}, 
      {name:'note', index:'note', width:150, sortable:false} ],
    pager: jQuery('#pager'),
    rowNum:10,
    rowList:[10,20,30],
    sortname: 'title',
    sortorder: "desc",
    viewrecords: true,
    imgpath: 'http://127.0.0.1/products/public/themes/basic/images',
    caption: 'Product List'
  }); 
}); 

But the url is hard coded to pull up data. The tutorial has:

jQuery(document).ready(function(){ 
  jQuery("#list").jqGrid({
    url:'example.php',
    datatype: 'xml',
    mtype: 'GET',
    colNames:['Inv No','Date', 'Amount','Tax','Total','Notes'],
    colModel :[ 
      {name:'invid', index:'invid', width:55}, 
      {name:'invdate', index:'invdate', width:90}, 
      {name:'amount', index:'amount', width:80, align:'right'}, 
      {name:'tax', index:'tax', width:80, align:'right'}, 
      {name:'total', index:'total', width:80, align:'right'}, 
      {name:'note', index:'note', width:150, sortable:false} ],
    pager: jQuery('#pager'),
    rowNum:10,
    rowList:[10,20,30],
    sortname: 'id',
    sortorder: "desc",
    viewrecords: true,
    imgpath: 'themes/basic/images',
    caption: 'My first grid'
  }); 
}); 

Obviously, the data in my querystring will change and I won’t always want the same url of: http://127.0.0.1/products/index.php/mystuff/test/1/5/productname/desc

And, the tutorial with example.php needs querystring variables so it can get the right data, but they never show that part that I can find. So how do I change the querystring? How do I send items dynmically? Also, the pager buttons send stuff like this because of the hardcode url:

http://127.0.0.1/products/index.php/mystuff/test/1/5/productname/desc?page=2&rows=10&sidx=productname&sord=desc&nd=1248988261293&_search=false

How can I just have a url like /test/the right variables? How can I change the querystring?

Thank you for any help. I hope it is not too obvious. I found setGridParam({url:newvalue}) but did not understand how to use it.

Here is the documentation. The tutorial is at the first part, top.

EDIT: Thanks for the below. I am trying to see how they use the setGridParam in their tutorial with example.php. They simply have example.php and I cannot see how they got the querystring variables there from the html page to the example.php page. setGridParam may be the right way to accomplish this but it is no where in the example so I cannot figure out how they passed the initial querystring variables over.

I know that I can do this:

    function gridSearch()
    {
        $("#list").setGridParam(
            {

                  url:"http://127.0.0.1/products/index.php/mystuff/test/1/5/productname/desc",
                page:1
            }
            ).trigger("reloadGrid");//Reload grid trigger
        return false
    }

<input id="sData" class="EditButton" type="submit" value="Search" onClick="return gridSearch()"/>

and that that will reload the grid (I tested it; it works), but how did they send over items in the tutorial in the first place? What if I do not want a button to reload but just pass in variables for it to initially load?

  • 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-12T06:11:04+00:00Added an answer on May 12, 2026 at 6:11 am

    After you have created your grid you can build up a url and then specify this and trigger the grid to reload.

    jQuery("#list").jqGrid().setGridParam({url : 'newUrl'}).trigger("reloadGrid")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 166k
  • Answers 166k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Well, your mileage may vary with different browsers and how… May 12, 2026 at 1:25 pm
  • Editorial Team
    Editorial Team added an answer I found the solution. The button's parent was using the… May 12, 2026 at 1:25 pm
  • Editorial Team
    Editorial Team added an answer Your SocketChannel handling seems to be incomplete, see this complete… May 12, 2026 at 1:25 pm

Related Questions

There are quite a number of modules on CPAN relating to the creation and
This is my first experience using the Zend Framework. I am attempting to follow
I'm totally new to both java and java Server worlds... But I've a good
I am working on an Orbited -powered website and I'm experiencing some annoying behavior

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.