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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:59:55+00:00 2026-05-27T13:59:55+00:00

I have this code just to send data from already loaded jqGrid: jQuery(#bedata).click(function(){ //Function

  • 0

I have this code just to send data from already loaded jqGrid:

jQuery("#bedata").click(function(){ //Function for button "bedata"

 var postData = "SOME DATA TO SEND"

//Sending data:
$.ajax({
    type: "POST";
    url: "GuardaFila.action", //Action called to data treatament (Struts 2)
    data : {
        jgGridData: postData, //PARAMETER jgGrdData with variable "postData" value
        customData: "someinfo" //Just another parameter called "customData" with more data,
    },

    dataType:"json",
    contentType: "application/x-www-form-urlencoded; charset=utf-8",

//Success function has the key that I am looking for:
    success: function(response, textStatus, xhr) {
        //SOME CODE HERE TO REFILL jqGrid.
        alert("success");
     },
    error: function(xhr, textStatus, errorThrown) {
        alert("error");
    }

});
});

jqGrid has been created before this way:

  jQuery("#rowed3").jqGrid({
                url:'CargaTabla.action',
                datatype: "json",
                colNames:['id', 'Direccion', 'Nombre'],
                colModel:[
                    {name:'id',index:'id', width:55},
                    {name:'direccion',index:'direccion', width:90, editable:true},
                    {name:'nombre',index:'nombre', width:100,editable:true}
                ],
                jsonReader: {
                    root: 'gridModel',
                    id: '0',
                    cell :"",
                    repeatitems: false
                },


(....... etc)

So, id for jqGrid table is #rowed3. I know that in the ajax function:

        success: function(response, textStatus, xhr) {
        //SOME CODE HERE TO REFILL jqGrid.
        alert("success");
     },

response parameter has a the new content in JSON for the grid. I tried some ways to refill the grid with its data as setting its “datastr” parameter with its content and others. Has someone faced before this problem?

Thank you.

  • 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-27T13:59:55+00:00Added an answer on May 27, 2026 at 1:59 pm

    Don’t reinvent the wheel here. jqGrid already knows how to fetch data, so you don’t need to call $.ajax. Just change the grid params and tell it to do its thing (from memory; correct function names if need be, but this will give you the idea):

    var opts = { url: "GuardaFila.action", postData: postData };
    grid.setGridParam(opts);
    grid.trigger("reloadGrid");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just come across this code: function test(){ //... if ( $profilerule ==
I have this mySQL code that connects to my server. It connects just fine:
I have added some code which compiles cleanly and have just received this Windows
I have a Firefox 3.6.2 problem (3.5.x works just fine). This is the code:
I have this code in jQuery, that I want to reimplement with the prototype
If you have to retrieve data from a database and bring this dataset to
i use json_encode to send back data from php to jquery through ajax. and
I have just compiled this code: http://www.win32developer.com/tutorial/winsock/winsock_tutorial_2.shtm I have added some codes so it
I have an class which should send/receive data in packet form. This class contains
I have this code: chars = #some list try: indx = chars.index(chars) except ValueError:

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.