Forum


13:14

28/03/2011

I've been looking around but I can't seem to get this to work. I'm assuming it's some sort of DOM issue but I really don't know.
I have a div where I dynamically create the table for jqGrid. If we use the example from the demo here http://www.trirand.com/blog/jq.....qgrid.html
This works just fine:
<div id="MyGridData"><table id="list4"></table></div>
This does not
<div id="MyGridData"></div>
then in js:
$("#MyGridData").html('<table id="list4"></table>')
Any ideas why?
Everything else is the same as the demo. I put the relevant MyData and loading code in document.ready for when the page loads.
13:30

10/08/2009

Hello atrius,
dynamically creating of the table used for jqGrid work fine. See the demo for example.
You just have a bug in your code. Typical errors are: 1) use create <div> element instead of <table> element; 2) you initialize jqGrid (call $("#MyGridData").jqGrid({/*parameters of jqGrid*/})) before the corresponding <table> element are placed on the page.
Best regerds
Oleg
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66