I have a CGridView (BootGridView to be exact, but that should be interchangeable) showing some columns from my database table. One column is a tinyint ‘boolean’ flag that represents an active/inactive data entry.
For example; my column is named ‘Active’.
In this column, depending on the data rows status, it shows an int that is either 0 or 1.
Where do I start off, to incorporate a checkbox button that switches this on/off via Ajax, directly in the grid view? A checkbox instead of the 0/1 and having to go into a different edit view.
It feels like I have probably 20 different ways to accomplish this, but I can’t figure out a really intuitive and sane approach.
There is an example in the cookbook (newest Yii book) that creates a ‘Flag’ column. In his solution he displays Y/N values and clicking toggles the value in the database.
I’m using the code from the cookbook chapter 7 for this - the Flag Column class works as expected. However, when I implement in the admin of my site - I’ve created an admin module for this - I’m getting errors in Firebug “NetworkError: 403 CHttpException”… any ideas as to what is wrong here?
The FlagColumn class under protected/modules/admin/components is