PHPackages                             hmtvltk2/yii2-grid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hmtvltk2/yii2-grid

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

hmtvltk2/yii2-grid
==================

Yii 2 GridView on steroids. Various enhancements and utilities for the Yii 2.0 GridView widget.

v3.3.4(6y ago)047BSD-3-Clause

Since Jun 28Pushed 6y agoCompare

[ Source](https://github.com/hmtvltk2/yii2-grid)[ Packagist](https://packagist.org/packages/hmtvltk2/yii2-grid)[ Docs](https://github.com/kartik-v/yii2-grid)[ RSS](/packages/hmtvltk2-yii2-grid/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (52)Used By (0)

 [ ![Krajee Logo](https://camo.githubusercontent.com/4addfbb3869c3fc7d79befea4f06d9cf3655a686fb503df0da1d725859cfdef9/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f6b72616a65652d6c6f676f2d622e706e67) ](http://demos.krajee.com "Krajee Demos")
 yii2-grid ---

 [ ![Donate](https://camo.githubusercontent.com/4af77d425ca202e55ab3d711b438e238ded194735bc345a019ac060e03e26227/687474703a2f2f6b617274696b2d762e6769746875622e696f2f626f6f7473747261702d66696c65696e7075742d73616d706c65732f73616d706c65732f646f6e6174652e706e67) ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DTP3NZQ6G2AYU "Donate via Paypal")
=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#------------------------yii2-grid--------------------)

[![Financial Contributors on Open Collective](https://camo.githubusercontent.com/43fbab15e7601d1b563c62d04067d551a4df9704bfd68f1ad5f8332d31999c87/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f616c6c2f62616467652e7376673f6c6162656c3d66696e616e6369616c2b636f6e7472696275746f7273)](https://opencollective.com/yii2-grid)[![Stable Version](https://camo.githubusercontent.com/78506289f0e61304e71e4a1a9959cc21640c2f70e80d90c0d5cbd6c688427ae5/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d677269642f762f737461626c65)](https://packagist.org/packages/kartik-v/yii2-grid)[![Unstable Version](https://camo.githubusercontent.com/0ff848d0491b1481ba79fd63fda9e510e5edd3b6699bec6b993e23530188977a/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d677269642f762f756e737461626c65)](https://packagist.org/packages/kartik-v/yii2-grid)[![License](https://camo.githubusercontent.com/b791bae22b85e6de9db8f0b025b7be046f4ea4bebe31a2974c829a42b04e72e7/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d677269642f6c6963656e7365)](https://packagist.org/packages/kartik-v/yii2-grid)

[![Total Downloads](https://camo.githubusercontent.com/7c9babe9bce2300c0aca4af6b70d285ac7c67d46e7c173d3c2ea0ecc0e067b57/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d677269642f646f776e6c6f616473)](https://packagist.org/packages/kartik-v/yii2-grid)[![Monthly Downloads](https://camo.githubusercontent.com/645d8bbbd4f544217e6b2d24beb3c1acaafb850e43f103f51f2492e27ce64874/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d677269642f642f6d6f6e74686c79)](https://packagist.org/packages/kartik-v/yii2-grid)[![Daily Downloads](https://camo.githubusercontent.com/93dfe421a0adf10233ec0fe14e5c8b3c46a53582aad2bffc30cab1f2d57cdb7e/68747470733a2f2f706f7365722e707567782e6f72672f6b617274696b2d762f796969322d677269642f642f6461696c79)](https://packagist.org/packages/kartik-v/yii2-grid)

Yii2 GridView on steroids. A module with various modifications and enhancements to one of the most used widgets by Yii developers. The widget contains new additional Grid Columns with enhanced settings for Yii Framework 2.0. The widget also incorporates various Bootstrap 3.x styling options. Refer [detailed documentation](http://demos.krajee.com/grid) and/or a [complete demo](http://demos.krajee.com/grid-demo). You can also view the [grid grouping demo here](http://demos.krajee.com/group-grid).

[![GridView Screenshot](https://camo.githubusercontent.com/40825c7fe7f98c79cab9ff815e5e0e1ed82675952a8d2c4b966c04bb41edecc4/68747470733a2f2f6c68342e676f6f676c6575736572636f6e74656e742e636f6d2f2d34782d436479795a4173592f564e784c506d61614158492f41414141414141414151382f585959785469515a764a6b2f773836382d683531362d6e6f2f6b72616a65652d796969322d677269642e6a7067)](https://camo.githubusercontent.com/40825c7fe7f98c79cab9ff815e5e0e1ed82675952a8d2c4b966c04bb41edecc4/68747470733a2f2f6c68342e676f6f676c6575736572636f6e74656e742e636f6d2f2d34782d436479795a4173592f564e784c506d61614158492f41414141414141414151382f585959785469515a764a6b2f773836382d683531362d6e6f2f6b72616a65652d796969322d677269642e6a7067)

### Documentation and Demo

[](#documentation-and-demo)

You can see detailed [documentation](http://demos.krajee.com/grid) and [demonstration](http://demos.krajee.com/grid-demo) on usage of the extension. You can also view the [grid grouping demo here](http://demos.krajee.com/group-grid).

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

### Pre-requisites

[](#pre-requisites)

> Note: Check the [composer.json](https://github.com/kartik-v/yii2-dropdown-x/blob/master/composer.json) for this extension's requirements and dependencies. You must set the `minimum-stability` to `dev` in the **composer.json** file in your application root folder before installation of this extension OR if your `minimum-stability` is set to any other value other than `dev`, then set the following in the require section of your composer.json file

```
kartik-v/yii2-grid: "@dev",
kartik-v/yii2-krajee-base: "@dev"

```

Read this [web tip /wiki](http://webtips.krajee.com/setting-composer-minimum-stability-application/) on setting the `minimum-stability` settings for your application's composer.json.

### Install

[](#install)

Either run

```
$ php composer.phar require kartik-v/yii2-grid "@dev"

```

or add

```
"kartik-v/yii2-grid": "@dev"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

```
use kartik\grid\GridView;
$gridColumns = [
    ['class' => 'kartik\grid\SerialColumn'],
    [
        'class' => 'kartik\grid\EditableColumn',
        'attribute' => 'name',
        'pageSummary' => 'Page Total',
        'vAlign'=>'middle',
        'headerOptions'=>['class'=>'kv-sticky-column'],
        'contentOptions'=>['class'=>'kv-sticky-column'],
        'editableOptions'=>['header'=>'Name', 'size'=>'md']
    ],
    [
        'attribute'=>'color',
        'value'=>function ($model, $key, $index, $widget) {
            return "   " .
                $model->color . '';
        },
        'filterType'=>GridView::FILTER_COLOR,
        'vAlign'=>'middle',
        'format'=>'raw',
        'width'=>'150px',
        'noWrap'=>true
    ],
    [
        'class'=>'kartik\grid\BooleanColumn',
        'attribute'=>'status',
        'vAlign'=>'middle',
    ],
    [
        'class' => 'kartik\grid\ActionColumn',
        'dropdown' => true,
        'vAlign'=>'middle',
        'urlCreator' => function($action, $model, $key, $index) { return '#'; },
        'viewOptions'=>['title'=>$viewMsg, 'data-toggle'=>'tooltip'],
        'updateOptions'=>['title'=>$updateMsg, 'data-toggle'=>'tooltip'],
        'deleteOptions'=>['title'=>$deleteMsg, 'data-toggle'=>'tooltip'],
    ],
    ['class' => 'kartik\grid\CheckboxColumn']
];
echo GridView::widget([
    'dataProvider' => $dataProvider,
    'filterModel' => $searchModel,
    'columns' => $gridColumns,
    'containerOptions' => ['style'=>'overflow: auto'], // only set when $responsive = false
    'beforeHeader'=>[
        [
            'columns'=>[
                ['content'=>'Header Before 1', 'options'=>['colspan'=>4, 'class'=>'text-center warning']],
                ['content'=>'Header Before 2', 'options'=>['colspan'=>4, 'class'=>'text-center warning']],
                ['content'=>'Header Before 3', 'options'=>['colspan'=>3, 'class'=>'text-center warning']],
            ],
            'options'=>['class'=>'skip-export'] // remove this row from export
        ]
    ],
    'toolbar' =>  [
        ['content'=>
            Html::button('&lt;i class="glyphicon glyphicon-plus">&lt;/i>', ['type'=>'button', 'title'=>Yii::t('kvgrid', 'Add Book'), 'class'=>'btn btn-success', 'onclick'=>'alert("This will launch the book creation form.\n\nDisabled for this demo!");']) . ' '.
            Html::a('&lt;i class="glyphicon glyphicon-repeat">&lt;/i>', ['grid-demo'], ['data-pjax'=>0, 'class' => 'btn btn-default', 'title'=>Yii::t('kvgrid', 'Reset Grid')])
        ],
        '{export}',
        '{toggleData}'
    ],
    'pjax' => true,
    'bordered' => true,
    'striped' => false,
    'condensed' => false,
    'responsive' => true,
    'hover' => true,
    'floatHeader' => true,
    'floatHeaderOptions' => ['top' => $scrollingTop],
    'showPageSummary' => true,
    'panel' => [
        'type' => GridView::TYPE_PRIMARY
    ],
]);
```

Contributors
------------

[](#contributors)

### Code Contributors

[](#code-contributors)

This project exists thanks to all the people who contribute. \[[Contribute](.github/CONTRIBUTING.md)\]

[![](https://camo.githubusercontent.com/bc009be169f9ed0826c062e61b4d9675e54f71a854e72a40cec54004e8d823e7/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f636f6e7472696275746f72732e7376673f77696474683d38393026627574746f6e3d66616c7365)](https://github.com/kartik-v/yii2-grid/graphs/contributors)

### Financial Contributors

[](#financial-contributors)

Become a financial contributor and help us sustain our community. \[[Contribute](https://opencollective.com/yii2-grid/contribute)\]

#### Individuals

[](#individuals)

[![](https://camo.githubusercontent.com/4c27bdea244b0fab7cf4fd2cd3fb51b1cb75ccf86ee117bf385c6769967cbad9/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f696e646976696475616c732e7376673f77696474683d383930)](https://opencollective.com/yii2-grid)

#### Organizations

[](#organizations)

Support this project with your organization. Your logo will show up here with a link to your website. \[[Contribute](https://opencollective.com/yii2-grid/contribute)\]

[![](https://camo.githubusercontent.com/c6ddd9032727620988e68e8d1ce8192ff62c33afd74ac712ba101107ad19889b/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f6f7267616e697a6174696f6e2f302f6176617461722e737667)](https://opencollective.com/yii2-grid/organization/0/website)[![](https://camo.githubusercontent.com/97b6b3dff920dc2f6c2d5e40b7187bbdecdb598529dcc111e0c6901d547234cb/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f6f7267616e697a6174696f6e2f312f6176617461722e737667)](https://opencollective.com/yii2-grid/organization/1/website)[![](https://camo.githubusercontent.com/c8253bcccdcc2e98e9356ec61a9cd1a0e8f1601c57e017dff4fedcf97f7ae4f7/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f6f7267616e697a6174696f6e2f322f6176617461722e737667)](https://opencollective.com/yii2-grid/organization/2/website)[![](https://camo.githubusercontent.com/bd45af865b54cc4369682990bd5516e60c84289f98790da7cb98dc2ccd4edd56/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f6f7267616e697a6174696f6e2f332f6176617461722e737667)](https://opencollective.com/yii2-grid/organization/3/website)[![](https://camo.githubusercontent.com/8332e3c9c336e21dfb9598d2010579dc9dd2df838af8fbf87ffe4a62ace2f196/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f6f7267616e697a6174696f6e2f342f6176617461722e737667)](https://opencollective.com/yii2-grid/organization/4/website)[![](https://camo.githubusercontent.com/d2265949b8e39c9c18ef6bdcb1845a961f1055b1da918f731b5f75b23b155495/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f6f7267616e697a6174696f6e2f352f6176617461722e737667)](https://opencollective.com/yii2-grid/organization/5/website)[![](https://camo.githubusercontent.com/91d344b7778bc6524d56d9d80b4079048b2aadceb0d7506f31eab4bcb334e3b5/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f6f7267616e697a6174696f6e2f362f6176617461722e737667)](https://opencollective.com/yii2-grid/organization/6/website)[![](https://camo.githubusercontent.com/a1719e8c5f4806e22b6c6ed22d2379914bbed430ce725da5dc7f49bebae4fee7/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f6f7267616e697a6174696f6e2f372f6176617461722e737667)](https://opencollective.com/yii2-grid/organization/7/website)[![](https://camo.githubusercontent.com/80607b02526fc735faa44ffca89dd98b697e20e2e2141ae645325f5a219eb066/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f6f7267616e697a6174696f6e2f382f6176617461722e737667)](https://opencollective.com/yii2-grid/organization/8/website)[![](https://camo.githubusercontent.com/302b3148cfeb56dd332ac442c9096c5468a0d10f03b335d956bd5dab5fec9d26/68747470733a2f2f6f70656e636f6c6c6563746976652e636f6d2f796969322d677269642f6f7267616e697a6174696f6e2f392f6176617461722e737667)](https://opencollective.com/yii2-grid/organization/9/website)

License
-------

[](#license)

**yii2-grid** is released under the BSD-3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 88.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~37 days

Total

51

Last Release

2451d ago

Major Versions

v1.9.0 → v2.0.02014-10-11

v2.9.0 → v3.0.02015-02-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8da38156f44e107dc2c4dbe986c17da1ae563d0d5459ab0c78e60b8289d6959?d=identicon)[hmtvltk2](/maintainers/hmtvltk2)

---

Top Contributors

[![kartik-v](https://avatars.githubusercontent.com/u/3592619?v=4)](https://github.com/kartik-v "kartik-v (634 commits)")[![derekisbusy](https://avatars.githubusercontent.com/u/5118781?v=4)](https://github.com/derekisbusy "derekisbusy (8 commits)")[![thiagotalma](https://avatars.githubusercontent.com/u/612578?v=4)](https://github.com/thiagotalma "thiagotalma (6 commits)")[![XzAeRo](https://avatars.githubusercontent.com/u/1656037?v=4)](https://github.com/XzAeRo "XzAeRo (6 commits)")[![boehsermoe](https://avatars.githubusercontent.com/u/2466744?v=4)](https://github.com/boehsermoe "boehsermoe (5 commits)")[![pappfer](https://avatars.githubusercontent.com/u/738623?v=4)](https://github.com/pappfer "pappfer (5 commits)")[![lestat1968](https://avatars.githubusercontent.com/u/7681695?v=4)](https://github.com/lestat1968 "lestat1968 (4 commits)")[![fruppel](https://avatars.githubusercontent.com/u/3985601?v=4)](https://github.com/fruppel "fruppel (4 commits)")[![almirb](https://avatars.githubusercontent.com/u/1752962?v=4)](https://github.com/almirb "almirb (3 commits)")[![muhammadcahya](https://avatars.githubusercontent.com/u/4241620?v=4)](https://github.com/muhammadcahya "muhammadcahya (3 commits)")[![vishuB](https://avatars.githubusercontent.com/u/13677102?v=4)](https://github.com/vishuB "vishuB (3 commits)")[![udokmeci](https://avatars.githubusercontent.com/u/8896298?v=4)](https://github.com/udokmeci "udokmeci (2 commits)")[![uldisn](https://avatars.githubusercontent.com/u/3525344?v=4)](https://github.com/uldisn "uldisn (2 commits)")[![dvdkrgr](https://avatars.githubusercontent.com/u/11403884?v=4)](https://github.com/dvdkrgr "dvdkrgr (2 commits)")[![giannisdag](https://avatars.githubusercontent.com/u/2151129?v=4)](https://github.com/giannisdag "giannisdag (2 commits)")[![monghuz](https://avatars.githubusercontent.com/u/1073614?v=4)](https://github.com/monghuz "monghuz (2 commits)")[![anothersoftware-lv](https://avatars.githubusercontent.com/u/9327511?v=4)](https://github.com/anothersoftware-lv "anothersoftware-lv (2 commits)")[![nbogol](https://avatars.githubusercontent.com/u/2125591?v=4)](https://github.com/nbogol "nbogol (2 commits)")[![newerton](https://avatars.githubusercontent.com/u/4175945?v=4)](https://github.com/newerton "newerton (2 commits)")[![niki7har](https://avatars.githubusercontent.com/u/17407292?v=4)](https://github.com/niki7har "niki7har (2 commits)")

---

Tags

gridyii2extensionwidget

### Embed Badge

![Health badge](/badges/hmtvltk2-yii2-grid/health.svg)

```
[![Health](https://phpackages.com/badges/hmtvltk2-yii2-grid/health.svg)](https://phpackages.com/packages/hmtvltk2-yii2-grid)
```

###  Alternatives

[kartik-v/yii2-grid

Yii 2 GridView on steroids. Various enhancements and utilities for the Yii 2.0 GridView widget.

5576.6M179](/packages/kartik-v-yii2-grid)[kartik-v/yii2-widget-colorinput

An enhanced Yii 2 widget encapsulating the HTML 5 color input (sub repo split from yii2-widgets)

324.8M10](/packages/kartik-v-yii2-widget-colorinput)[mickgeek/yii2-actionbar

A control bar with bulk actions for the GridView widget.

3444.5k](/packages/mickgeek-yii2-actionbar)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
