Hi.
In this case you’ll need to write your own column formatter. Remember that you are in an object-oriented framework. You can extend Grid class, override init_button(){} with an empty function and the default AJAX behavior will be changed.
replace this with your code, something like:
class ScholarGrid extends Grid {
function init_button($field){
@$this->columns[$field]['thparam'].=' style="width: 40px; text-align: center"';
$this->js(true)->find('.button_'.$field)->button();
$this->js(‘click’, $rightcolumn->js()->reload(array(‘id’=> $this->js()->_selectorThis()->closest(’tr’)->attr(‘rel’))) )->selector(‘#’.$this->name.’ button_’.$field);
}
function format_button($field){
$this->current_row_html[$field]='<button type="button" class="'.$this->columns[$field]['button_class'].'button_'.$field.'" '.
'\')">'.
(isset($this->columns[$field]['icon'])?$this->columns[$field]['icon']:'').
$this->columns[$field]['descr'].'</button>';
}
This solution is quite hardcore for your first use of Agile Toolkit, that’s why I suggested to go with default two-AJAX requests. With this new code (i haven’t tested it) you will produce a javascript like this:
$(‘#gridname button_student_id’).click(function(){ $(‘#id_of_rightside’).univ().atk4_load( ‘/path/to/page’, ‘id’=>$(this).closest(’tr’).attr(‘rel’) ) });
If you struggle to get this working, give me a shout and I’ll create an example for that.