Home › Forums › Guriddo jqGrid JS › Help › Dynamic colModel
How can I dynamicly load colNames and colModels from a backend? My backend system is php and I want to generate a grid depending on the content that is pushed from my backend.
Thanx
There are a couple of ways depending on what you want to do.
Declare two variables – one for colNames the other for colModel –
on the server construct these arrays and pass them before constructing the grid.
Also you can construct the whole page with PHP and etc.
Regards
Tony
Yes but can you change it after the grid is made? Or add some columns dynamicly
Currently this is not possible. If you need some simple you can use hidden columns and the hideCol and showCol methods
Ok I found a sollution. It wasn't that difficult and just to let you all know it does work.
The php end:
function test(){
Just one more adjustment for the colModel in the php end.
$test->colmodel = array(array('name' => 'id', 'index' => 'id', 'editable' => false , 'editoptions' => array('readonly' => true,'size' => 10)),
Great,
Thanks. Also we can use
Stay connected with us in your favorite flavor!
Copyright 2014 TriRand LtdAll Rights ReservedRSS