deesoft / yii2-handsontable
Yii2 Handsontable widget
Installs: 247
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Type:yii2-extension
Requires
- bower-asset/handsontable: 0.23.*@stable
- yiisoft/yii2: ~2.0.4
This package is not auto-updated.
Last update: 2024-10-26 19:21:38 UTC
README
Yii2 Handsontable widget
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require deesoft/yii2-handsontable "~1.0"
or add
"deesoft/yii2-handsontable": "~1.0"
to the require section of your composer.json
file.
Usage
<?php use dee\handsontable\Handsontable; ?> <?= Handsontable::widget([ 'varName' => 'table1', // <- optional 'clientOptions' => [ 'data' => $data, 'column' => [ ['data' => 'id'], ['data' => 'name.first'], ['data' => 'name.last'], ['data' => 'address'] ], 'afterChange' => new JsExpresion('function(){...}'), ], ]);?> <?php $this->registerJs($this->render('_script.js')); ?>
file _script.js
$('mybtn').click(function(){ tableData = table1.getData(); // do something with tableData });