M
M
My joy2018-04-26 15:31:37
Yii
My joy, 2018-04-26 15:31:37

How to get to tr-filter in gridview?

Hi friends!
You need to get to the link in the column name:
5ae1c5f6d708b589531743.png
in order to hang a tooltip and a few more actions on this link, for this you need to write several attributes and a couple more classes to the a tag. But I don't understand how to get to it from php. You can get to tr through contentOptions , but I didn’t find how deeper. Help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-04-26
@t-alexashka

these links are created by yii\widgets\LinkSorter and it has $linkOptions, respectively, it is in the dataProvider, and already the dataProvider gets into the gridView.
But when we render columns, we use yii\grid\DataColumn, and it has sortLinkOptions
https://www.yiiframework.com/doc/api/2.0/yii-grid-...
So, depending on the tasks, the first or second
And yes, what you call a filter is an input under the link. And the link itself is sorting. Filter != sort.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question