Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
No data appears in grid
23/03/2009
14:59
Avatar
donnek
Member
Members
Forum Posts: 3
Member Since:
23/03/2009
sp_UserOfflineSmall Offline

I'm going through the "Creating your first grid" tutorial, and have set up the data, the index.html and example.php as suggested.  However, when I run the page, I get the grid layout, but no data inside it.  I have added al query to index.php as well:

$db = mysql_connect('localhost', 'myuser', 'mypassword') or die("Connection Error: " . mysql_error());
$myinv=mysql_select_db('mydatabase', $db) or die("Error connecting to db.");
$result = mysql_query("SELECT COUNT(*) AS count FROM invheader");
$row = mysql_fetch_array($result,MYSQL_ASSOC);
$count = $row['count'];
echo "Number of records: ".$count;

and this shows, below the empty grid:

Number of records: 2

as expected (there are two records in the db table), which suggests access to the db is OK.

The Firebug console gives the Response as:

<?xml version='1.0' encoding='utf-8'?><rows><page>1</page><total>1</total><records>2</records><row id
='2'><cell>2</cell><cell>2009-03-24</cell><cell>24.00</cell><cell>3.00</cell><cell>27.00</cell><cell
><![CDATA[watch re payment]]></cell></row><row id='1'><cell>1</cell><cell>2009-03-23</cell><cell>5.00
</cell><cell>1.00</cell><cell>6.00</cell><cell><![CDATA[first entry]]></cell></row></rows>

which seems to suggest that XML is making it back to the page, but is just not being displayed for some reason.

Any suggestions on what might be wrong?

I'm using Firefox 3.0.1 on openSUSE 10.2.

Thanks

Kevin

24/03/2009
03:17
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Remove or comment this line:

echo “Number of records: “.$count;

and see what is happen.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

24/03/2009
03:50
Avatar
donnek
Member
Members
Forum Posts: 3
Member Since:
23/03/2009
sp_UserOfflineSmall Offline

I had just added this query to index.html in order to be sure that some data was being returned from the db - I've taken it out now.  What I don't understand is that data is definitely coming back from the db (as this query showed) and Firebug seems to be showing a properly formatted response, but no data is appearing in the grid.

24/03/2009
04:01
Avatar
donnek
Member
Members
Forum Posts: 3
Member Since:
23/03/2009
sp_UserOfflineSmall Offline

I've downloaded the non-minified jquery-1.3.2 from their site, and renamed it to jquery.js.  Running the page, Firebug says there is a problem at line 3633:

// Send the data
3632 try {
3633 xhr.send(s.data);
3634 } catch(e) {
3635 jQuery.handleError(s, xhr, null, e);
3636 }

This doesn't mean much to me, I'm afraid Cry

25/03/2009
11:10
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Something is wrong with your request. I recommend first - get the generated xml and use it as datatype: 'xmlstring'  in the grid. Refer in the docs and examples

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
28 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information