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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:40:20+00:00 2026-05-28T04:40:20+00:00

I’m initializing the grid like so: $(#mainGrid).jqGrid({ url : g_MainGridUrl, datatype : ‘json’, height

  • 0

I’m initializing the grid like so:

$("#mainGrid").jqGrid({
    url : g_MainGridUrl,
    datatype : 'json',
    height : 460,
    autowidth : true,
    colNames : g_ColNames,
    colModel : g_ColModel,
    pager : '#pager',
    rowNum : 100,
    rowList : [100, 200, 300],
    sortname : g_DefaultSort,
    sortorder : 'desc',
    sortable: true,
    viewrecords : true,
    caption : 'Results',
    hidegrid : false,
    rownumbers : true,          
    jsonReader : {
        root : "ROWS",
        page : "PAGE",
        total : "TOTAL",
        records : "RECORDS",
        cell : "",
        id : g_DefaultSort
    },
    loadComplete: function(){
        var num_records = $('#mainGrid').getGridParam('records');
        $('#gview_mainGrid div.ui-jqgrid-titlebar span').html('Results: '+num_records);
    },
    loadBeforeSend : function(thisXhr) {
        xhr = thisXhr;
    },
    ondblClickRow: function(rowid) {
        jQuery(this).jqGrid('viewGridRow', rowid, { width: "500"});
    }
});

$("#mainGrid").jqGrid('navGrid', '#pager', {
    del : false,
    add : false,
    edit : false,
    refresh:false,
    search: false,
    view: true
});

$("#mainGrid").jqGrid('navButtonAdd','#pager',{
    caption: "Columns",
    title: "Reorder Columns",
    onClickButton : function (){
        $("#mainGrid").jqGrid("columnChooser", {
            done: function() {
                resize_the_grid();
            },
            height: 320
        });
    }
});

and calling the grid like so, after building a filter Object:

$('#mainGrid').setGridParam({
        url : g_MainGridUrl + Ext.util.JSON.encode(filter)
    });
$('#mainGrid').trigger("reloadGrid");   

As the subject states, when I double-click on a row to view its record and then change rows from the modal dialog, not all columns get updated – some do, but not others. I thought it might be because I didn’t have <th>s defined for the table, so I tried adding them. I have downloaded the most recent version (4.2.0). There are no errors shown. This is true in IE8, Chrome, Safari. Any ideas?

UPDATE: I think I’ve found the cause, but still don’t have a solution. It seems that any column that has a title with a space in the name can’t read the grid correctly. I confirmed by adding underscores to replace the spaces in the titles, and found that for each column corrected, its values began updating. I’m filing a bug report at Trirand.

UPDATE 2: It seems there already was a bug report filed:
trirand forum – however, the author doesn’t consider it a bug, but rather expects developers to not use column headers with spaces, as jqgrid builds IDs based on the names in the column model. I’ve requested that this behavior be changed but expect I’ll have to dig around in his code to make it work.

  • 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-28T04:40:21+00:00Added an answer on May 28, 2026 at 4:40 am

    Since the developer has decided that column names may not have spaces (not sure if this is mentioned anywhere in the documentation), I fixed it by hacking the jqgrid source code. Inside the viewGridRow() function, add this line:

    nm = nm.replace(' ', '_');
    

    in two places; first between these two lines in function createData():

    nm = this.name;
    setme = false;
    

    second, between these two lines in function fillData():

    nm = obj.p.colModel[i].name;
    // hidden fields are included in the form
    

    Now, all ids are created with underscores in the place of spaces and all is well.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I would like to count the length of a string with PHP. The string
I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

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.