php - Yii2 DataView data-key -


i new yii / php coming mainframe/midrange world, hope make sense

i following definitive guide yii 2.0 , section on gii -> crud generator generated code (gridview) works great 1 table works great , data-key value in tr tag records key value. when change code add join shown below, data-key not incremental starting @ zero. how can set data-key value key of primary table?

the code below

public function search($params)     {  // generated code removed     // $query = headerfile::find()   //new code added     $query = new query;     $query->from('headerfile');     $query->join('left join', 'detailfile', 'headerfile.keyfield = detailfile.keyfield');     $query->where('employeenumber = 123456');   // remaining code     $dataprovider = new activedataprovider([             'query' => $query,         ]);          $this->load($params); 


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -