Skip to content
Advertisement

Is it possible to use n or in Yii2 Kartik GridView DataColumn title?

I have a table with many colomns. It has a big lable strings and smal data strings, like ‘Average usage time’ and ’55’,

JavaScript

so i want to show label in a few lines, like

JavaScript

to fit table into screen. Problem is that DataColumn ignore both ‘n’ symbol and br tags in label. Is there any way to do this?

DataColumn example:

JavaScript

Advertisement

Answer

Here is your solution please add type attribute.

JavaScript

may it helps you. please add this 'type' => 'raw' in attribute it allows to use html.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement