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
Problem with sorting
26/01/2010
00:17
Avatar
dorr
Member
Members
Forum Posts: 15
Member Since:
24/01/2010
sp_UserOfflineSmall Offline

My grid displays fine but I'm having 2 problems:

  1. Sorting is not working – When I click the headers it executes but nothing is sorted
  2. The grid displays fine in Chrome, but does not display the data in IE

Here is the html and xml that I am using.  Has anyone experienced these problems?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<link rel="stylesheet" type="text/css" media="screen" href="C:/jqgrid_test/jquery_theme/css/ui-lightness/jquery-ui-1.7.2.custom.css" />

<link rel="stylesheet" type="text/css" media="screen" href="C:/jqgrid_test/jqgrid/css/ui.jqgrid.css" />

<link rel="stylesheet" type="text/css" media="screen" href="C:/jqgrid_test/jqgrid/src/css/ui.multiselect.css" />

<script src="C:/jqgrid_test/jqgrid/js/jquery-1.3.2.min.js" type="text/javascript"></script>

<script src="C:/jqgrid_test/jqgrid/js/i18n/grid.locale-en.js" type="text/javascript"></script>

<script src="C:/jqgrid_test/jqgrid/js/jquery.jqGrid.min.js" type="text/javascript"></script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8″ />

<script>

jQuery(document).ready(function(){

jQuery("#stateList").jqGrid({

url:"state.xml",

datatype:"xml",

mtype:"GET",

colNames:["State Id","State Code","State Name"],

colModel :[

{name:"stateId", index:"stateId", width:70},

{name:"stateCde", index:"stateCde", width:100},

{name:"stateNameTxt", index:"stateNameTxt", width:200, align:"left"},

],

pager: jQuery("#pager"),

rowNum:10,

rowList:[10,20,30],

sortname: "stateNameTxt",

sortorder: "desc",

viewrecords: true,

caption: "State List",

multiselect:true,

loadtext:"Loading…"

});

});

</script>

</head>

<body>

<table id='stateList'></table>

<div id='pager' style='text-align:center;'></div>

</body>

</html>

Data:

<?xml version='1.0' encoding = 'utf-8'?>

<rows>

<page>1</page>

<total>1</total>

<records>4</records>

<row id = "1″>

<cell>1</cell>

<cell><![CDATA[GA]]></cell>

<cell><![CDATA[Georgia]]></cell>

</row>

<row id = "2″>

<cell>2</cell>

<cell><![CDATA[FL]]></cell>

<cell><![CDATA[Florida]]></cell>

</row>

<row id = "3″>

<cell>3</cell>

<cell><![CDATA[SC]]></cell>

<cell><![CDATA[South Carolina]]></cell>

</row>

<row id = "4″>

<cell>4</cell>

<cell><![CDATA[NC]]></cell>

<cell><![CDATA[North Carolina]]></cell>

</row>

</rows>

Thanks for any help.

26/01/2010
04:33
Avatar
dorr
Member
Members
Forum Posts: 15
Member Since:
24/01/2010
sp_UserOfflineSmall Offline

I've got the sorting problem fixed but am still having problems with data not displaying in IE.

26/01/2010
18:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

This is not correct

colModel :[

{name:"stateId", index:"stateId", width:70},

{name:"stateCde", index:"stateCde", width:100},

{name:"stateNameTxt", index:"stateNameTxt", width:200, align:"left"}, <===== ERROR IN IE

],

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.

26/01/2010
19:15
Avatar
dorr
Member
Members
Forum Posts: 15
Member Since:
24/01/2010
sp_UserOfflineSmall Offline

I changed to this, but am still not getting any data in IE:

colModel :[

{name:"stateId", index:"stateId", width:70},

{name:"stateCde", index:"stateCde", width:100},

{name:"stateNameTxt", index:"stateNameTxt", width:200}

],

28/01/2010
17:32
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Clear the cache. What is the error reported from IE?

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.

28/01/2010
19:09
Avatar
dorr
Member
Members
Forum Posts: 15
Member Since:
24/01/2010
sp_UserOfflineSmall Offline

I cleared the cache, but still no data.  I'm not seeing an error, it's just not displaying the data.  I was thinking it may be something with the xml because the 'Page' is not getting set to 1 in the grid. 

29/01/2010
02:12
Avatar
dorr
Member
Members
Forum Posts: 15
Member Since:
24/01/2010
sp_UserOfflineSmall Offline

Got it working.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
87 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