I need to add a new record inside a table by clicking a link (or a button) who’s inside a JuiDialogBox but all my attempt have failed. I don’t have anymore idea and don’t find anything with my friend Google.
I think you are using cgridview to display the records from the table,You can use a view button in the Actions Column of the CGridvies and then u can open a cjuidialog to display the particular record of the table and then u can update the table record with respect to the unique id of the respective row using ajax
array (
'type'=>'POST',
'url'=>"<?php Yii::app()->createUrl('site/update') ?>",[b]//Here using this controller sction you can update the Particular Row [/b]
'data'=>{'rowid':row_id},
'success'=> function(data) {
$('#dialog_id').close(); //[b]dialog_id represents the cjuidialog id[/b]
$.fn.Yiigridview.update('site_grid'); //[b]site_grid is nothing but the id of the Grid[/b]
},