ActionColumn in yii2treeGridwidget

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.