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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:37:15+00:00 2026-05-28T23:37:15+00:00

I am using cookies to load a users previous sorting and paging options. I

  • 0

I am using cookies to load a users previous sorting and paging options. I would like to take those saved values, and set them as the parameters the server receives.

The paramaters I wish to change are as follows, (rows are replaced by max via prmNames)

/&max=20&page=1&sidx=&sord=asc

I have tried using:

   $.extend($.jgrid.defaults, {
    sidx:"fName",
    sord:"desc",
    page:2,
    rows:10});

and variations of:

      beforeRequest:function(){
        $('#grid').jqGrid('setGridParam', {
            sidx: "fName",
            sord: "desc",
            page: 2,
            max: 10
        });

    }

It changes the value for page using $.extend($.jgrid.defaults… , but I cannot get the other parameters to change.

  • 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-28T23:37:16+00:00Added an answer on May 28, 2026 at 11:37 pm

    You need just use setGridParam to set parameters of jqGrid which have another names as sidx, sord, page and rows.

    sidx -> sortname
    sord -> sortorder
    page -> page
    rows -> rowNum
    

    So the best would be to create jqGrid directly with the above parameters initialized from the cookie.

    If you would have problem with creation the grid directly with the parameters which you need you can first create the grid with datatype: 'local' which will prevent the loading the grid. Then you change the parameters which you need and additionally set datatype to the value which you need (‘json’ or ‘xml’). At the end you reload the grid. So the code should be like the following

    $('#list').jqGrid('setGridParam', {
        datatype: 'json',
        sortname: "fName",
        sortorder: "desc",
        page: 2,
        rowNum: 10
    }).trigger('reloadGrid');
    

    If you would have problem with creation the grid directly with the parameters which you need. additionally create the grid with datatype: 'local' it will prevent the loading the grid

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

Sidebar

Related Questions

Does MVC.NET handle Roles using cookies, or does a controller check with the Role
I am trying to use PHP session without using cookies. I have enabled session.use_trans_sid
How can I open a web-page and receive its cookies using PHP? The motivation
I'm using session-based cookies with my website. To my complete surprise, I noticed if
I'm currently using the default cookies as my single sign on (SSO) but some
I am trying to find a way using jquery without cookies to display a
can cookies be blocked using a page directive instead of doing it programmatic?
How do you delete all the cookies for the current domain using JavaScript?
I've decided to attempt using the double submitted cookies technique to attempt to prevent
When using an HttpConnection in a BlackBerry app, you often get HTTP cookies in

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.