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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:46:41+00:00 2026-06-05T19:46:41+00:00

Current requirement is on button click I am getting a json data through ajax

  • 0

Current requirement is on button click I am getting a json data through ajax which contains information about a table header and ,data.
I want to show the table data using jqgrid,so for that I am preparing jqgrid by using following code:

$("#fixedId").jqGrid({ 
        datatype: 'clientSide',
        colNames:colName,//from json response
        colModel :colModels,//from json response
                   pager: '',
                   shrinkToFit:true,
                   autowidth:true,
                   rowNum:10,
                   rowList:[10,20,30],
                   emptyrecords: "Empty records",
                   viewrecords: true,
                   width: '100%',
                   height: '100%',
                   altRows:true,
                   scrollOffset: 0,
                   gridview: true,
                   rownumbers:false,
                   multiselect:false,
                   multiboxonly:false,
                   caption: ''         
    }); 

    $("#"+tableId).jqGrid('gridResize', { minWidth: 450, minHeight: 200 });

I am adding data to this newly created table using jqgrid addRowData function.

So things are working fine for first time.
Now when I get a new json response to paint this new table details via ajax ,I have to delete the old table,
so to delete the old table data I tried

1) $("#fixedId").remove();
recreated table tag using..

$("#tableParent").append('<table id=fixedId><tr><td /></tr></table>');

and then re call previous code to create this fresh table with new header and data ,but this new header,data table is not getting painted on screen.The screen remains empty and i couldnot see any table on screen.

2) I tried

$("#gbox_fixedId").remove();

repeated step 1 to generate new table and add data..again same result..I could not see any table on screen.

3) I tried

$("#gbox_fixedId").find(".ui-jqgrid-htable").remove();

This option is working but after 3-4 times repainting new tables I could see each table which is painted looks bit distorted and after some more repaint it become hard to use the table.

Any solution as how can I delete the old jqgrid and create fresh/clean jqgrid so that it works smooth?

  • 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-06-05T19:46:42+00:00Added an answer on June 5, 2026 at 7:46 pm

    Before calling $("#fixedId").jqGrid(); I assume you have this structure:

    <div id="tableParent">
        <table id="fixedId"></table>
    </div>
    

    Then, if you inspect your dom after calling jqGrid, you will notice that fixedId is no longer direct child of tableParent because jqGrid warp it into other elements, so to delete your grid, you will need to call:

    $("#tableParent").empty();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to current requirement,user will upload files with large size,which he may like to
I have a requirement where I need to generate a report about current software
Need information about minimum hardware requirement for better experience in developing Android application. My
I have a simple HTML button which contains text and an image: HTML: (Already
I have a requirement on my current project (a Flex app which will be
My current requirement is: I have to package my grails app and use teamcity
I am developing JavaME LWUIT application which needs to display some data on map.
I have a subgrid which is n:n relationship to current record. I want to
Our current web application is using SQL Server, we have a requirement for support
I'm developing an android app, I've requirement to show the user current location and

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.