Hello,
I have a "date column" in mysql database, datatype is 'int(10)' . I want to input/show the field in the grid 'yyyy-mm-dd' . How to do it?
Rgds,
Method1: You can apply string operations in your SQL (select query) and format that integer date value to yyyy-mm-dd.
Method2: You can use events of grid,
i) on_data_display event is called before rendering data to grid. In that event, you can perform the date formatting action.
ii) as your database has numeric field, you also might need to use on_update & on_insert event, to make yyyy-mm-dd to interger equivalent before insertion.
For both events, refer demos/editing/custom-events.php
Hello,
in server side event, we can get the field value by$data[params][fieldname].
in on_data_display client side event, how to transform the field value of grid?
Rgds,
Hello,
in server side event, we can get the field value by $data[params][fieldname].
in on_data_display client side event, how to update the field value of grid?
Rgds,