A
A
Anton2016-10-07 15:38:20
Yii
Anton, 2016-10-07 15:38:20

How to change the value of a CRUD column?

Hello. I have a regular crud with a GridView where there is a user_id column how to make it not user_id but model-> user-> username is displayed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
mitaichik, 2016-10-07
Reytarovsky @Antonchik

In the GridView column configuration, replace user_id with user.username (this is, of course, if the relays are written correctly)

M
Maxim Fedorov, 2016-10-07
@qonand

Тема вывода зависимых данных в гриде с возможностью дальнейшей сортировки и фильтрации по ним довольно не плохо описана в документации фреймворка, в частности
тут https://github.com/yiisoft/yii2/blob/master/docs/g...
и тут https://github.com/yiisoft/yii2/blob/master/docs/g...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question