Welcome Guest, Not a member yet? Register   Sign In
Design help about integrating a javascript library/helper
#9

[eluser]webtigers[/eluser]
PHP provides json_encode() and json_decode() functions in PHP5.2+. You could output your columnDefs (or whatever other data you need) to a hidden input control or even the innerHTML of a hidden div and then pull that data into the DOM via a safe JSON parser. This is ugly, but it works.

The best way to do this, however, would be to include your column defs or other data as part of an ajax routine. I've used this sort of thing on applications in the past where the data I was retrieving had variable columns. you just need to setup your definitions to accept whatever the server tosses at you and format the known columns as you see fit.

BTW, I like the look of this grid component's pagination bar. Gonna have to borrow the styling for my own. Nice and clean. Wink


Messages In This Thread
Design help about integrating a javascript library/helper - by El Forum - 06-29-2010, 02:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB