aishuishou
aishuishou

Reputation: 83

how to refresh the gridview after a line just deleted in /yii2

i can write onclick function using ajax,when actioncolumn:delete triggered,i just reload the full div part of gridview---seem to be very old style.

But how to refresh the state of the only deleted line? can it be possibale with pjax(i try some code by google,but fails...)?

Upvotes: 2

Views: 1835

Answers (2)

tnchalise
tnchalise

Reputation: 1583

This is also work on yii2

$("<id_of_GridView>").yiiGridView("applyFilter");

Upvotes: -1

dzona
dzona

Reputation: 3751

try this one

$.pjax.reload({container: '#gridId'});

or like this

$.pjax({url: 'your-url', container: '#gridId'});

Upvotes: 2

Related Questions