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
Gird Not Displaying Data
31/10/2009
07:47
Avatar
mgbee
Member
Members
Forum Posts: 3
Member Since:
31/10/2009
sp_UserOfflineSmall Offline

I created a very simple grid

jQuery(document).ready(function() {


var bid = jQuery("#bids");



var  properties = {

width: 500,

datatype:

"json",

mtype:

"GET",

colModel: [

{ name:

"BidID",index:"BidID", label: "Bid ID" },

{ name:

"CustomerID", index:"CustomerID",label: "Customer ID" },

{ name:

"Description",index:"Description", label: "Description" },

{ name:

"BidNumber",index:"BidNumber", label: "Bid Number" },

{ name:

"BidStatusID",index:"BidStatusID", label: "Bid Status ID" }

],

pager: $(

"#pager"),

rowNum: 5,

rowList: [5, 10],

jsonReader: { root:

"rows", page: "page", total: "total", records: "records", repeatitems: false },

imgpath:

"Scripts/themes/redmond/images",

viewrecords:

true,

caption:

"Bids",

url:

"/Bid/GridData1",

gridComplete:

function() {

var x = jQuery("#bids").getRowData(1);

alert(x.BidID);

}

};

bid.jqGrid(properties).navGrid(pager, { edit:

false, add: false, del: false, search: false });

I am referencing all the grid js files

The Controller is returning data, here is the data from Fiddler

{"total":2,"page":1,"records":6,"rows":"[{\\"BidID\\":1,\\"CustomerID\\":1,\\"BidNumber\\":\\"123456\\",\\"Description\\":\\"Descriptionn\\",\\"BidStatusID\\":1},{\\"BidID\\":2,\\"CustomerID\\":2,\\"BidNumber\\":\\"123456\\",\\"Description\\":\\"Description2\\",\\"BidStatusID\\":2},{\\"BidID\\":3,\\"CustomerID\\":3,\\"BidNumber\\":\\"1234567\\",\\"Description\\":\\"Description description\\",\\"BidStatusID\\":1},{\\"BidID\\":4,\\"CustomerID\\":1,\\"BidNumber\\":\\"2324231\\",\\"Description\\":\\"Descrc DFSd\\",\\"BidStatusID\\":1},{\\"BidID\\":5,\\"CustomerID\\":1,\\"BidNumber\\":\\"ws2345\\",\\"Description\\":\\"wewqw qwe qweqw \\",\\"BidStatusID\\":2}]","userdata":null}

However the grid displays 5 rows but no data in the rows.

Any suggestions as to what might cause this to occur, also the alert in grid complete returns nothing.

02/11/2009
13:44
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Your response is not acceptable. Take a look at backslashes.

Best 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.

03/11/2009
14:36
Avatar
mgbee
Member
Members
Forum Posts: 3
Member Since:
31/10/2009
sp_UserOfflineSmall Offline

Thanks.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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