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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:52:44+00:00 2026-05-31T01:52:44+00:00

I am trying to implement a jqGrid in my site. Everything works fine when

  • 0

I am trying to implement a jqGrid in my site. Everything works fine when i load it once but when i rerun the function to load the data it doesnt update. What i did was removed the table and then added it again before I update it. This worked in Mozilla but when i run it in IE it crashes. here is the code I have:

<div id="tabs-3">

                    <table id="userStatistics" style="width:100%">

                    </table><div id="pager1"></div>

                </div>

And here is the function that adds the grid.

function generateSummaryStatistics(app, range) {
 /*$("#gbox_userStatistics").remove();
 $("#pager1").remove();*/
 $("#tabs-3").html('<table id="userStatistics" style="width:100%"></table><div id="pager1"></div>');
 $("#userStatistics").jqGrid({
     url:"/WebServiceURL/GetLogMetricCountinputReportName="+app+"&startLogDate="+range,
     datatype: 'xml',
     mtype: 'GET',
     colNames:['Date','User','Department','Application','Number Times Run'],
        colModel: [{name:'logDate', index:'logDate',xmlmap:'logDate'},
        {name:'reportUserName', index:'reportUserName',xmlmap:'reportUserName'},
        {name:'departmentNumber', index:'departmentNumber',xmlmap:'departmentNumber'},
        {name:'reportName', index:'reportName',xmlmap:'reportName'},
        {name:'numOfQueries', index:'numOfQueries',xmlmap:'numOfQueries'}],
             xmlReader: { 
                   root:"returnList", 
                   row:"UsageMetricsDTO",
                   repeatitems:false,
                   id : "departmentNumber"
               },
                 rowNum:10,
                 rowList:[10, 20, 30, 40, 50],
                 shrinkToFit:false,
                 viewrecords: true,
                 loadonce: true,
                 caption: 'Summary Statistics',
                 pager: $('#pager1'),
                 autoWidth:true,
                 multiselect:false,
                 gridview: true,
                 emptyrecords: "No records Found"
             }).navGrid('#pager1',{edit:false,add:false,del:false});
 $('.ui-jqgrid-bdiv').css({height: 'auto', 'max-height': 250});

}

Any idea why this would cause IE to crash.

Like I said it works fine in Mozilla but once its run for a second time in IE it crashes. I’m not seeing any errors in the console in firebug either or in the eclipse console.

Can anyone help or suggest a better way to do this?

Thanks,

Craig

  • 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-31T01:52:46+00:00Added an answer on May 31, 2026 at 1:52 am

    I am not sure why IE crash, but you can do the same work in a little other way and all should work without any problems.

    First it’s important to understand, that jqGrid construct some additional divs over the <table> element. jqGrid provide special method GridUnload to destroy old grid and to place initial <table> an the pager <div>. So you should better use

    $("#userStatistics").jqGrid('GridUnload');
    

    instead of $("#tabs-3").html(...);.

    In the most cases one should do this only if you need to create another grid on the same place. For example in the answer and this one one changes the number of columns in the grid. So one uses the method.

    In your case what you need to do is just reloading the grid body with another data. In the case much more effective would be to create the grid only once, and all next times just change the url and reload the grid body. Because you use loadonce: true it follows to changing the datatype to 'local' after the first grid load. So you should reset the datatype to the original 'xml' value additionally to resetting 'url'. The corresponding code will be

    $("#userStatistics").jqGrid('setGridParam', {
        url: newUrlValue,
        datatype: 'xml'
    }).trigger("reloadGrid", [{page: 1}]);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement a simple function using jqGrid, but it doesn't seem to
Trying to implement search with Sunspot Gem wich is using Solr.Fulltext search works fine
Trying to implement AVAudioplayer and get some metering data of the played music, but
Has anyone been able to implement the JQuery grid plugin, jqGrid? I'm trying to
I am trying to implement jqgrid v3.7 in my webapplication created using cakephp v1.3.
Ok well I'm trying implement something similar to the 'undo' function in many image
I'm trying to implement jqgrid search on MVC, following the interesting answer by @Oleg,
Trying to implement a function that will return a list of ints the represent
I'm trying to implement a custom button on a jqGrid with hide and show
I've been trying to implement jQuery's grid function in my Asp.Net MVC app. I'm

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.