As shown in the TreeGrid plug-in of yii2, the button ID does not match the column {code ...}
The TreeGrid plug-in of yii2 is used.
As shown in, the button ID does not match the column
View code
$ DataProvider, 'keycolumnname' => 'id', 'parentcolumnname' => 'parent _ id', 'parentrootvalue' => '0 ', // first parentId value 'column' => ['areaname', 'id', // 'parent _ id ', ['class' => 'yii \ grid \ ActionColumn ',]);?> Controller code public function actionIndex () {$ areaObject = new CpArea (); $ areaQuery = $ areaObject: find ()-> orderBy ('id '); $ dataProvider = new ActiveDataProvider (['query' => $ areaQuery,]); return $ this-> render ('index ', ['dataprovider' => $ dataProvider]);} I want to know how to match the three buttons in the column with the column id.
Reply content:
The TreeGrid plug-in of yii2 is used.
As shown in, the button ID does not match the column
View code
$ DataProvider, 'keycolumnname' => 'id', 'parentcolumnname' => 'parent _ id', 'parentrootvalue' => '0 ', // first parentId value 'column' => ['areaname', 'id', // 'parent _ id ', ['class' => 'yii \ grid \ ActionColumn ',]);?> Controller code public function actionIndex () {$ areaObject = new CpArea (); $ areaQuery = $ areaObject: find ()-> orderBy ('id '); $ dataProvider = new ActiveDataProvider (['query' => $ areaQuery,]); return $ this-> render ('index ', ['dataprovider' => $ dataProvider]);} I want to know how to match the three buttons in the column with the column id.
Hello, do you have QQ? Please contact us. I have some technical questions and hope to contact you. My QQ is 97521142