Edit cell of GridView

Hi everybody, I want to edit a cell of the GridView,

I have this:

The model:

public function getInputField($fieldName) {

  return CActiveForm::textField($this,$fieldName,array("name"=>"form_name[".$fieldName."][" .$this->Id . "]"));


The grid:





But, How can I save the value in the input fields??

Because I want to complete the Fields and the submit it

Thanks you very much.!!

You have placed input field in grid view, but just changing input field value won’t save it in DB. I suppose you could add some button with attached js that will fire request to server, but in this case I would use editable, check those :




1 Like