zerocustom
(Adi Wirawan Gm)
1
Hallo, I have view interface like image below , so what property should I use to create text field in New activity column?
Is it possible place input text field inside GridView ? I use GridView::widget .
I have read the documentation here http://www.yiiframework.com/doc-2.0/yii-grid-column.html
but still no idea
Thx
1 Like
olegl84
(Oleg)
2
Of course it is easily possible, just create class that extends DataColumn, and use it as one of your columns,
[
class => '\YourNamespace\YourClass'
]
And you will need some code to handle request data.
gifrancohe
(Giovannyfrancoherrera)
3
Hi.
I think that maybe this can help you.
GrindView Editable
regards,
zerocustom
(Adi Wirawan Gm)
4
stil no idea how to extends DataColumn,
my code like this
[‘class’ => ‘yii\grid\DataColumn’,
'label' => 'New Activity',
],
the new activity column still not change to input text .
datacolumn is used to show data columns and allows sorting and filtering them ?
how it can change the column type ?
olegl84
(Oleg)
5
I ment you should use class inheritance. If you do not know what is it you defently should learn this concept.
zerocustom
(Adi Wirawan Gm)
6
Are you mean like this ?
[
'value' =>
function(){ return Html::textInput('', ''); },
'attribute' => 'new_activity',
'format' => 'raw',
],
Just want to know, if there is another method ?
yanuarihsan
(Yanuar Ihsan91)
7