Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

In Tbgridview How To Show Multiple Model Fields

$
0
0
Hi
I have two tables
1. student (studentId, name, student_rId)
2. registration (rId, regNumber)

Student_rId and rId is an entity relation of one is to one nature

I have used Crud to generate code

I am facing trouble to show in student view
student.studentId, student.name, registration.regNumber

My code looks as below
<?php $this->widget('bootstrap.widgets.TbGridView',array(
'id'=>'student-grid',
'dataProvider'=>$model->Search(),
'filter'=>$model,
'columns'=>array(
'studentId',
'name',
'student_rId',
array(
'class'=>'bootstrap.widgets.TbButtonColumn',
),
),
)); ?>

:)

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>