Hi.
I want to use jqGrid with ZF, so I wrote simple helper based on ZendX_JQuery
helpers.
I have a problem with some params.
As result I must have:
jQuery("#list2").jqGrid({
url: '/artist/list/format/json/',
datatype: 'json',
viewrecords: true,
* pager: jQuery('#pager2'),*
rowNum:20,
rowList:[10,20,30],
imgpath: "/css/themes/sand/images",
sortname: 'id',
colNames: ['Id', 'Nazwa'],
colModel: [
{name: 'artist_id', index:'artist_id', width:55},
{name: 'artist_name', index:'artist_name', width:300}
],
});
so I make array with this options.
$params = array(
...
'pager' => "jquery('#pager2')",
...
);
After Zend_Json::encode($myarray) i have:
...
"pager": "jquery('#pager2')"
...
from jqGridDocumentation: pager defines that we want to use a pager bar to
navigate through the records. This must be a valid html element;
In my example it's a string.
What is the best solution for this?
regards,
--
Paweł Chuchmała
pawel.chuchmala at gmail dot com