logos010
(Logos010)
1
Hi everybody,
I have a problem, and i want to solved it.
In my case, i have cgridview and a cbutonColumn with buttonid as below:
I want to add a code of company (ma_ct) to "click" option to invoke a ajax function, but i can not add $data->ma_ct in to callAjax() function.
anyone help me. Thanks
mdomba
(Maurizio Domba Cerin)
2
$data is evaluated on runtime when rendering the page…
The click function is executed when the page is already rendered so you cannot use $data anymore…
You can use jQuery to read the value of the ma_ct column for the current row (the row where the users has clicked the update button)
Here is a similar post with an example of how to read the first column - http://www.yiiframework.com/forum/index.php?/topic/13804-