himiklab/yii2-handsontable-widget A minimalist Excel-like grid widget for Yii2

Handsontable Widget for Yii2

  1. Installation
  2. Usage

A minimalist Excel-like grid widget for Yii2 based on Handsontable.

Packagist Packagist license

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist "himiklab/yii2-handsontable-widget" "*"

or add

"himiklab/yii2-handsontable-widget" : "*"

to the require section of your application's composer.json file.

Usage

use himiklab\handsontable\HandsontableWidget;

<?= HandsontableWidget::widget([
    'settings' => [
        'data' => [
            ['A1', 'B1', 'C1'],
            ['A2', 'B2', 'C2'],
        ],
        'colHeaders' => true,
        'rowHeaders' => true,
    ]
]) ?>

or with ActiveRecord

in view: `php use himiklab\handsontable\HandsontableWidget;

<?= HandsontableWidget::widget([

'requestUrl' => 'hts',
'isRemoteChange' => true,

]); ?> `

in controller: `php use app\models\Page; use himiklab\handsontable\actions\HandsontableActiveAction;

public function actions() {

return [
    'hts' => [
        'class' => HandsontableActiveAction::className(),
        'model' => Page::className(),
        'isChangeable' => true,
    ],
];

} `

1 0
1 follower
8 222 downloads
Yii Version: 2.0
License: MIT
Developed by: nata90
Created on: Jun 26, 2020
Last updated: (not set)
Packagist Profile
Github Repository

Related Extensions