on selection change in yii2

Hi all,

is there any widget is available for row click / on selection change in yii2.

because i am using

'rowOptions' => function ($model, $key, $index, $grid) {


                return ['id' => $model['national_holiday_id'], 'onclick' => "window.location='" .\Yii::$app->urlManager->createUrl('/national-holidays/view?id=', ['id'=>'']) . "' + this.id;"];


this works proper,but when i am updating or deleting any record, it will directly redirect to view page…

Please provide any solutions…


With regards,