I have two tables student,and student group. In student table there has student group_id, which is foreign key of Student group table. Now i want a list where group name will be drop down and ASC order.
In the _form page of student folder write code
<div class="row"> <?php echo $form->labelEx($model,'Group_ID'); ?> <?php echo $form->dropDownList($model,'StudentGroup', CHtml::listData(StudentGroup::model()->findAll(), 'Group_Id', 'Group_Name'), array('empty'=>'Select location'));?> <?php echo $form->error($model,'Group_ID'); ?> </div>
It shows the following error
Property "student.studentGroup" is not defined.
how to solve this.
Please help me as soon as possible.