Hi, I’m new to yii and web programming.
I have a page set up like this :
-CGridView with a column containing the name of the item and another containing an ‘add’ button.
-Another CGridView, empty when you load the page
What I want to do is, when you click on the add button, the element next to the button is added to the second CGridView. How do I do that ? The items listed in the first CGridView are from a model, so I figured I should write a method in the controller linked to the said model. This is what I wrote in the controller file. (I’m kinda new to the MVC thing too.)
But how do I get it to be displayed in the separate CGridView ?
Also, if I want all items of a CGridView stocked into an array, how can I do that ?
Any help is much appreciated, thanks