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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T09:47:48+00:00 2026-05-29T09:47:48+00:00

I am sending a string down from a websockets server to my client that

  • 0

I am sending a string down from a websockets server to my client that has a jqgrid on it.

the string is a JSON object which I”m converting using eval() (I know that’s not best practice, but this is just for a proof of concept at this point).

I’m just trying to reload the jqgrid with:

var obj = eval("(" + msg.data + ")");
$("#list").setGridParam({ "postData" : obj }).trigger("reloadGrid");

where msg is the parameter in my socket.onmessage callback, if I alert (msg.data), I see my correctly formed JSON string, but my grid isn’t reloading.

if I alert obj, I see that it’s converting to an object correctly.

I also tried splitting out the trigger(“reloadGrid”) onto a separate line with my $(“#list) prepending it…still not reloading.

any suggestions?

  • 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-29T09:47:49+00:00Added an answer on May 29, 2026 at 9:47 am

    If you use datatype: 'jsonstring' and datastr: msg.data and you want reload the grid with another data you should understand that datatype: 'jsonstring' will be changed to datatype: 'jsonstring' after the first load. The postData parameter will be used only if you communicate with the server. In the case the datatype must be either 'json' or 'xml'. The url parameter should be set in the case too.

    So I you can try to do the following:

    $("#list").setGridParam({
        datatype: 'jsonstring', // reset the `datatype`
        datastr: msg.data       // set new value of the input data
    }).trigger("reloadGrid");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sending a couple of files from an HTML form to my server which
I'm having difficulty parsing some JSON data returned from my server using jQuery.ajax() To
I am facing problems in sending json response to php that I get from
I am coding a PHP rest Service. I am sending xml string from client
Sending a message from the Unix command line using mail TO_ADDR results in an
A client is sending a string containing a date in format YYYYMMDDHHmmSS (e.g. 201004224432
i am developing an application in which i will be sending a string to
I have the following Java socket client app, that sends same string to socket
I am sending a xml string to my web application using httpClient#execute(HttpPost, ResponseHandler) It
I am trying to benchmark some code. I am sending a String msg over

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.