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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:12:08+00:00 2026-06-04T02:12:08+00:00

I’m trying to display set of data using jq grid. For that I used

  • 0

I’m trying to display set of data using “jq grid”. For that I used below code, But it’s showing only empty rows without data.Can anyone figure-out what is wrong in this code ?

I’m getting data by using ajax.So the “response” will get a data like this

{ID:"id1", Message: "Happy Birth Day", Date: "2012-05-24", Time: "14:18:00", status: "pending"}!{ID:"id3", Message: "Happy Birth Day", Date: "2012-05-24", Time: "14:18:00", status: "pending"}

After get data, split it and adding to an array.Then trying to display it.

This is .JSP file

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.js"></script>
  <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/sunny/jquery-ui.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" type="text/css" media="screen" href="grid/css/ui.jqgrid.css" />
  <script src="grid/js/i18n/grid.locale-en.js" type="text/javascript"></script>
  <script src="grid/js/jquery.jqGrid.min.js" type="text/javascript"></script>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <title>Edit Scheduled SMS</title>
  <script type="text/javascript">
    $(function(){ 
        $("#list").jqGrid({
        datatype: "local",
            colNames:['ID','Message', 'Date','Time','status'],
            colModel :[ 
                {name:'ID', index:'ID', width:60}, 
                {name:'Message', index:'Message', width:200}, 
                {name:'Date', index:'Date', width:90, align:'right'}, 
                {name:'Time', index:'Time', width:90, align:'right'}, 
                {name:'status', index:'status', width:80, align:'right'} 
           ],
           pager: '#pager',
           rowNum:10,
           rowList:[10,20,30],
           sortname: 'invid',
           viewrecords: true,
           gridview: true,
           caption: 'Single SMS'
        }); 
        $.ajax({
            type : "GET",
            url : "ScheduledClass",
            data : {
                type : "getSingleScheduledMsg"
            }
        })
        .success(function(response,status){         
            tableResult = response;
            var tableData = [];     
            tableData=tableResult.split("!");   

            for(var i=0;i<tableData.length;i++)
                jQuery("#list").jqGrid('addRowData',i+1,tableData[i]);
        })
        .error(
            function() {//error !!!!!               
        });
    }); 
  </script>
  </head>
  <body>
      <div id="wrapper" style="height: 100%;">
          <div id="content_box" style="width: 600px;">
              <div class="ui-widget">
                  <div class="ui-widget-header">Edit Scheduled SMS</div>
                      <div>
                          <div class="ui-widget-content">
                              <div style="padding: 10px 10px 10px 10px;">
                                  <Form name="EditScheduledSMS" method="post"
                                        id="EditScheduledSMS style="display: inline;">
                                      <table id="list"><tr><td/></tr></table>
                                      <div id="pager"></div> 
      ......//closing tags...........

The final picture is like this:

A table without Data

  • 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-04T02:12:10+00:00Added an answer on June 4, 2026 at 2:12 am

    tableData[i] should be an object you have it as a string, if you convert your substrings to json strings you can try JSON.parse to change it into an object.
    Also if your using ajax to populate the grid, why use local as the datatype, jqgrid already uses ajax to populate the grid if you specify a url and a different data type.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I want to construct a data frame in an Rcpp function, but when I
I'm trying to create an if statement in PHP that prevents a single post
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
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.