asep
(Asep Mylocal)
1
Para masta Yii… mau nanya nih
Bagaimana caranya ya cara menambahkan teks di CGridView
ni contohnya
1870
si.JPG
Lihat kolom Size di sana ada tulisan KB(ane edit pake paint…
)
ini codingannya:
<?php $this->widget('zii.widgets.grid.CgridView', array(
'dataProvider'=>$attachments,
'columns'=>
array(
array(
'name' => 'Nama File',
'type' => 'raw',
'value' => 'CHtml::link(CHtml::encode($data->nama), Yii::app()->baseUrl ."/images/foto/". $data->nama)',
),
'size',
'url',
),
)); ?>
gimana caranya ya nambahin teks itu (kalau database tipe data integer/float)…?
mohon bantuannya gan…??
Thanks sebelumnya
mdomba
(Maurizio Domba Cerin)
2
Please use english in the general section… so that everybody can understand you and maybe help you…
re1nald0
(Reinld17)
3
Is this what you want?
<?php $this->widget('zii.widgets.grid.CgridView', array(
'dataProvider'=>$attachments,
'columns'=>array(
...
array(
'name'=>'size',
'value'=>'$data->size. " KB"'
),
'url'
),
)); ?>
asep
(Asep Mylocal)
4
oo oh… I’am sorry, I don’t know it was in general Discussion, I Think in Indonesian Discussion.
thanks for your respon.
asep
(Asep Mylocal)
5
yes it’s what I mean. Thnat good idea…
Thanks for all