T
T
teodolit2020-11-16 17:40:41
Yii
teodolit, 2020-11-16 17:40:41

GridView how to replace (not set) with another value?

Actually the essence of the question. we take records from some table and display them, while some records may not have all the fields filled in, because at the time of their creation, the default value was not registered.
And now they are displayed as (not set). how to set up a widget to write a filter so that a different text is displayed for them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vilinyh, 2020-11-16
@vilinyh

If locally for some component - in the component's configs, or globally in the formatter settings in the config:

'components' => [
    'formatter' => [
        'nullDisplay' => 'твой вывод',
        // ...
    ],
    // ...

https://www.yiiframework.com/doc/api/2.0/yii-i18n-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question