PHP code example of guopee / yii2-appendgrid

1. Go to this page and download the library: Download guopee/yii2-appendgrid library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

guopee / yii2-appendgrid example snippets


php composer.phar 

$form->field($this, $key)->widget(
	'guopee\appendGrid',
	[
	    'configs' =>
	        [
	            'initRows' => 1,
	            'columns' => [
	                ['name' => 'target', 'display' => '目标数量', 'type' => 'number'],
	                ['name' => 'money', 'display' => '优惠金额', 'type' => 'number'],
	                ['name' => 'discount', 'display' => '优惠折扣', 'type' => 'number'],
	            ],
	            'initData'=>json_decode($this->$key)
	        ]
	])