⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

gc_dependent_select unable to view relation data in read mode



wenkhairu
  • profile picture
  • Member

Posted 16 March 2014 - 04:48 AM

Hi, gc_dependent_select it's great Lib After All, but i Have a question, why when I'm using gc_dependent_select in the read mode my data doesn't appear in read mode ?here is my code

$fields = array(
	'kode_provinsi'=>array(
		'table_name'=>'m_provinsi',
		'title'=>'provinsi',
		'relate'=>null,
		'data-placeholder' => 'Pilih Provinsi' 
		),
	'kode_kabupaten'=>array(
		'table_name'=>'m_kabupaten',
		'title'=>'kabupaten',
		'id_field' => 'kode_kabupaten',
		'relate'=>'kode_provinsi',
		'data-placeholder' => 'Pilih Kabupaten' 
		),
	'KKec'=>array(
		'table_name'=>'kecamatan',
		'title'=>'NKec',
		'relate'=>'KKab',
		'id_field'=>'KKec',
		'data-placeholder' => 'Pilih Kecamatan' 
		),
	'KKel'=>array(
		'table_name'=>'kelurahan',
		'title'=>'NKel',
		'relate'=>'KKec',
		'id_field'=>'KKel',
		'data-placeholder' => 'Pilih Kelurahan' 
		)
);


$config = array(
'main_table' => 'identpeg',
'main_table_primary' => 'NIP',
"url" => base_url() .'index.php/'. strtolower(__CLASS__) . '/' .strtolower( __FUNCTION__) . '/',
'ajax_loader' => base_url() . 'ajax-loader.gif'
);

$provinsi = new gc_dependent_select($this->grocery_crud, $fields, $config);
$output = $provinsi->render();

in Add and  Edit Form, this working perfectly and no problem at all, but when in the read, data is gone ?