How to fix TypeError: jQuery(…).editable is not a function in yii2 kartik editable gridview issue

You could have a problem described below

This has been copied from

I am having a problem with the editable column in a gridview, I was hopingfor a point in the right direction to resolve. When I add a row in a blank grid via ajax, I reload the grid using pjax. On the Pjax reload the editable column comes up as a button and has no events triggered. Firebug reports the following error.

TypeError: jQuery(…).editable is not a function.

On a page reload after adding the first row everything works as expected. Adding a second line to the grid everything works as expected. The problem only occurs when the first row is added and the grid refreshed via pjax.

This can be fixed by loading the assets manually .

Just put this on the top of your view and it will work fine.

use kartik\editable\EditableAsset;


use kartik\editable\EditablePjaxAsset;


use kartik\popover\PopoverXAsset;


I have also reported it kartik here where more info can be found regards this issue.

Have a happy Yii2 programming!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s