AshishJoshi-asj / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

JSON and "" in jgq Options #139

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Question: 

I'm doing this:

$grid->updateColumn('OrderDate', array(
  'title' => 'Zeit',
  'jqg' => array(
     'formatter' => 'date',
'formatoptions' => array( 'newformat' => 'ISO8601Long', 'srcformat' =>
'Y.m.d H:i:s' ),
'search' => true,
searchoptions' => array( 'dataInit'=>'datePick', 'attr' =>
array('title'=>'Select Date')),
),
));

I get:

"searchoptions":{"dataInit":"datePick","attr":{"title":"Select Date"}}}

datePick is a javascript function.

With "" arounf dataInit it will not work.

May be we need this:
http://framework.zend.com/manual/en/zend.json.advanced.html

This is an example wich should work:

searchoptions:{
        dataInit:function(el){
                $(el).datepicker({
                        dateFormat:'dd-mm-yy',
                        onSelect: function(dateText, inst){
$("#grid_id")[0].triggerToolbar(); }
                });
        }

Original issue reported on code.google.com by kleina.i...@gmail.com on 19 Jan 2010 at 7:43

GoogleCodeExporter commented 9 years ago
find it ... sorry .. please close
please give example for new Zend_Json_Expr in wiki for other users

Original comment by kleina.i...@gmail.com on 19 Jan 2010 at 2:24

GoogleCodeExporter commented 9 years ago
Source of the main example at http://www.k2s.sk/grid/jqgrid contains such 
example.
I added entry to http://code.google.com/p/zfdatagrid/wiki/Faq.

Original comment by martin.m...@gmail.com on 25 Jan 2010 at 10:40