S
S
Sergey Melnikov2015-08-18 10:46:40
Yii
Sergey Melnikov, 2015-08-18 10:46:40

How to change the url of the sort links in the fields in the GridView?

Yii2 , in sorting links it is necessary to reassign paths to actions

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Pavlenko, 2015-08-18
@Akdmeh

www.yiiframework.com/doc-2.0/yii-data-sort.html#$r...
you can easily look it up in the documentation.
Will need to be done

GridView::widget([
    'sorter'=>[
        'route'=>['вашпуть/action']
    ]
]);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question