# GridViewAsset

> This asset bundle provides the javascript files for the yii\grid\GridView widget.

[API reference](/docs/api/index.md) › [yii](/docs/api/yii/index.md) › [grid](/docs/api/yii/grid/index.md) › GridViewAsset

| class | `yii\grid\GridViewAsset` |
| --- | --- |
| Extends | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) » [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| Implements | [`yii\base\Configurable`](/docs/api/yii/base/configurable/index.md) |
| Since | 2.0 |
| Source | [`framework/grid/GridViewAsset.php`](https://github.com/yiisoft/yii2/blob/22.0/framework/grid/GridViewAsset.php#L19) |

This asset bundle provides the javascript files for the [`GridView`](/docs/api/yii/grid/gridview/index.md) widget.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-basePath"></span>[`$basePath`](/docs/api/yii/web/assetbundle/index.md#property-basePath) | `string\|null` | The Web-accessible directory that contains the asset files in this bundle. Default: `null`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-baseUrl"></span>[`$baseUrl`](/docs/api/yii/web/assetbundle/index.md#property-baseUrl) | `string\|null` | The base URL for the relative asset files listed in [`$js`](/docs/api/yii/web/assetbundle/index.md#property-js) and [`$css`](/docs/api/yii/web/assetbundle/index.md#property-css). Default: `null`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-css"></span>[`$css`](/docs/api/yii/web/assetbundle/index.md#property-css) | `array<string\|array<array-key, mixed>>` | List of CSS files that this bundle contains. Default: `[]`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-cssOptions"></span>[`$cssOptions`](/docs/api/yii/web/assetbundle/index.md#property-cssOptions) | `yii\web\RegisterCssFileOptions` | The options that will be passed to [`View::registerCssFile()`](/docs/api/yii/web/view/index.md#method-registerCssFile) when registering the CSS files in this bundle. Default: `[]`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-depends"></span>`$depends` |  | Default: `['yii\web\YiiAsset']`. | `GridViewAsset` |
| <span id="property-js"></span>`$js` |  | Default: `['yii.gridView.js']`. | `GridViewAsset` |
| <span id="property-jsOptions"></span>[`$jsOptions`](/docs/api/yii/web/assetbundle/index.md#property-jsOptions) | `yii\web\RegisterJsFileOptions` | The options that will be passed to [`View::registerJsFile()`](/docs/api/yii/web/view/index.md#method-registerJsFile) when registering the JS files in this bundle. Default: `[]`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-publishOptions"></span>[`$publishOptions`](/docs/api/yii/web/assetbundle/index.md#property-publishOptions) | `yii\web\PublishOptions` | The options to be passed to [`AssetManager::publish()`](/docs/api/yii/web/assetmanager/index.md#method-publish) when the asset bundle is being published. Default: `[]`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-sourcePath"></span>`$sourcePath` |  | Default: `'@yii/assets'`. | `GridViewAsset` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| <span id="method-__construct"></span>[`__construct()`](/docs/api/yii/base/baseobject/index.md#method-__construct) | Constructor. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__call"></span>[`__call()`](/docs/api/yii/base/baseobject/index.md#method-__call) | Calls the named method which is not a class method. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__get"></span>[`__get()`](/docs/api/yii/base/baseobject/index.md#method-__get) | Returns the value of an object property. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__isset"></span>[`__isset()`](/docs/api/yii/base/baseobject/index.md#method-__isset) | Checks if a property is set, i.e. defined and not null. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__set"></span>[`__set()`](/docs/api/yii/base/baseobject/index.md#method-__set) | Sets value of an object property. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__unset"></span>[`__unset()`](/docs/api/yii/base/baseobject/index.md#method-__unset) | Sets an object property to null. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-canGetProperty"></span>[`canGetProperty()`](/docs/api/yii/base/baseobject/index.md#method-canGetProperty) | Returns a value indicating whether a property can be read. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-canSetProperty"></span>[`canSetProperty()`](/docs/api/yii/base/baseobject/index.md#method-canSetProperty) | Returns a value indicating whether a property can be set. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-className"></span>[`className()`](/docs/api/yii/base/baseobject/index.md#method-className) static | Returns the fully qualified name of this class. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-hasMethod"></span>[`hasMethod()`](/docs/api/yii/base/baseobject/index.md#method-hasMethod) | Returns a value indicating whether a method is defined. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-hasProperty"></span>[`hasProperty()`](/docs/api/yii/base/baseobject/index.md#method-hasProperty) | Returns a value indicating whether a property is defined. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-init"></span>[`init()`](/docs/api/yii/web/assetbundle/index.md#method-init) | Initializes the bundle. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="method-publish"></span>[`publish()`](/docs/api/yii/web/assetbundle/index.md#method-publish) | Publishes the asset bundle if its source code is not under Web-accessible directory. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="method-register"></span>[`register()`](/docs/api/yii/web/assetbundle/index.md#method-register) static | Registers this asset bundle with a view. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="method-registerAssetFiles"></span>[`registerAssetFiles()`](/docs/api/yii/web/assetbundle/index.md#method-registerAssetFiles) | Registers the CSS and JS files with the given view. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |