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
Dynamic Control Reference
28/03/2011
13:14
Avatar
atrius
New Member
Members
Forum Posts: 1
Member Since:
28/03/2011
sp_UserOfflineSmall Offline

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.

28/03/2011
13:30
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

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 

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