Hi, How to add view to see all details records in Actions area like delete and update in flexigrid
View in Actions
- Single Page
Posted 25 September 2013 - 14:30 PM
Posted 26 September 2013 - 08:43 AM
Hello [member=soltic].
I am afraid I can not understand your question. Can you please rephrase it?
Posted 26 September 2013 - 13:26 PM
Hi thanks to your reply am not English men but i'll try to reprase it correctly
Let's go:
in every grid there is at least delete and update operation for each record.
i want to insert a thrid operation which named "view" and which can see the details records for each line in the grid
Posted 26 September 2013 - 19:01 PM
Hi soltic.
Maybe, You can use add_action() function,
Then, in your controller add a function like:
function detail_view($id) { $query = $this->db->get_where('mytable', array('id' => $id)); if ($query->num_rows()) { $record = $query->row(); $this->load->view('your_custom_detail_view', $record); } else { echo 'error, ID not exists'; } }
You can design your custom view to display detailed record data as you want.
Or maybe I don't understand your question.
Regards.
Posted 27 September 2013 - 09:49 AM
If I understand you correctly you will find that version 1.4.0 and 1.4.1 of GC include a view action which shows the details of the selected record.
If you want a view that is formatted in a different way then you will need to construct a my_view function in your controller and a my_view view
Posted 27 September 2013 - 13:02 PM
Hi
@chavamm i know this method and thanks to your reply
But briggres's comment is what exactly i want to do
So can tell me a way to upgrade my grocerycrud version
Posted 28 September 2013 - 05:38 AM
Just copy and paste the newest files from the latest version on top of what you already have.
Make sure you backup files like application/config/grocerycrud.php if you have some special customizations in.
Now in order to be exactly correct this is not the proper way of doing an upgrade.
A proper upgrade should be :
- keep a backup of the current version to a safe place
- download and extract to a folder the latest (or the version you need) of CodeIgniter
- download and extract to the same folder the latest version of Grocery CRUD
- copy and paste your application files, e.g. controllers, models, views, helpers, libraries etc to the previous folder
- modify any configuration files you were using like application/config/database.php or application/config/routes.php
There isn't a clear procedure how to upgrade to a newest version and I believe it is quite different for each one!