Skip to content

apaoww/yii2-jqgrid-widget

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jqGrid Widget for Yii2

Yii2 wrapper for a powerful ajax-enabled grid free jqGrid jQuery plugin.

Installation

The preferred way to install this extension is through composer.

  • Either run
php composer.phar require  "apaoww/yii2-jqgrid-widget" "dev-master"

or add

"apaoww/yii2-jqgrid-widget" : "dev-master"

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

  • Add action in the controller (optional), for example:
use apaoww\jqgrid\actions\JqGridActiveAction;

public function actions()
{
    return [
        'jqgrid' => [
            'class' => JqGridActiveAction::className(),
            'model' => Page::className(),
            'scope' => function ($query) {
                /** @var \yii\db\ActiveQuery $query */
                $query->select(['title', 'author', 'language']);
            },
        ],
    ];
}
  • View's example:
use apaoww\jqgrid\JqGridWidget;
use yii\helpers\Url;

<?= JqGridWidget::widget([
    'requestUrl' => Url::to('jqgrid'),
    'gridSettings' => [
        'colNames' => ['Title', 'Author', 'Language'],
        'colModel' => [
            ['name' => 'title', 'index' => 'title', 'editable' => true],
            ['name' => 'author', 'index' => 'author', 'editable' => true],
            ['name' => 'language', 'index' => 'language', 'editable' => true]
        ],
        'rowNum' => 15,
        'autowidth' => true,
        'height' => 'auto',
    ],
    'pagerSettings' => [
        'edit' => true,
        'add' => true,
        'del' => true,
        'search' => ['multipleSearch' => true]
    ],
    'enableFilterToolbar' => true,
]) ?>

About

Yii2 jqgrid widget customize for oracle

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 95.4%
  • JavaScript 4.6%