here is some detail on the view
$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider' => $model->searchUsername(),//can be filter when I use $model->search() instead of $model->searchUsername()
'filter' => $model,
'selectableRows' => 1,
'selectionChanged' => 'CRUD_user',
'id' => 'gridPegawai',
'columns' => array(
array(
'header' => 'No',
'type' => 'raw',
'htmlOptions' => array('style' => 'text-align:center, width:50px'),
'value' => '$this->grid->dataProvider->pagination->currentPage*$this->grid->dataProvider->pagination->pageSize + $row+1'
),
array(
'header' => 'Kecamatan',
'name' => 'ms_kecamatan_id',
'type' => 'raw',
'htmlOptions' => array('sytle' => 'text-align:left'),
'value' => 'CHtml::encode($data->msKecamatan->nama)',
'filter' => LookupTable::GridFiltering('kecamatan')
),
array(
'header' => 'Desa',
'name' => 'ms_desa_id',
'type' => 'raw',
'htmlOptions' => array('style' => 'text-align:left'),
'value' => 'CHtml::encode($data->msDesa->nama)',
'filter' => LookupTable::GridFiltering('desa', isset($_GET['Jabatan']['ms_kecamatan_id']) ? $_GET['Jabatan']['ms_kecamatan_id'] : '')
),
array(
'header' => 'Jabatan',
'name' => 'ms_jabatan_id',
'type' => 'raw',
'htmlOptions' => array('style' => 'text-align: left'),
'value' => 'CHtml::encode($data->msJabatan->nama)',
'filter' => LookupTable::GridFiltering('jabatan')
),
array(
'name' => 'nama',
'type' => 'raw',
'sortable' => 'true',
'htmlOptions' => array('style' => 'text-align: left'),
'value' => 'CHtml::encode($data->msPerangkatDesa->nama)'
),
)
)
);
the columns Kecamatan and Desa is connected and both are combo box, when I change the Kecamatan it will affect the Desa as well. Both of them just like country and province, provinve and city, and so on…
I see that AJAX working fine here, because when I change the Kecamatan, Desa value is changing as well. But not with the CGridView data.
I think, that’s all information I need to add. Please tell me whether you need anymore information to solve my problem.
Thank you… 