PHP code example of schmasterz / yii2-widget-ag-grid

1. Go to this page and download the library: Download schmasterz/yii2-widget-ag-grid 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/ */

    

schmasterz / yii2-widget-ag-grid example snippets


<?= \schmasterz\agGrid\AgGridWidget::widget([
        'id' => 'ag-grid',
        'options' => [
            'style' => 'height: 600px;width:500px;'
        ],
        'gridOptions' => [
            'columnDefs' => [
                ['headerName' => 'Make', 'field' => 'make', 'sortable' => true],
                ['headerName' => 'Model', 'field' => 'model', 'sortable' => true],
                ['headerName' => 'Price', 'field' => 'price', 'sortable' => true],
            ],
            
        ]
     ]);

public $depends = [
    'schmasterz\agGrid\AgGridAsset',
];

schmasterz\agGrid\AgGridAsset::register($this);