Showinglast record with has _many relation in gridview of main table in yii

Hellow guys…

I have two tables.

1)LeadsAssigned say Table A

2)LeadsStatus say table B

My Table A model has relation like this

public function relations()

{


	


	return array(


                      'lead_status_rel' => array(self::HAS_MANY, 'LeadsStatus', 'leads_id',


															           'order'=>'lead_status_rel.id DESC',


															   ),


    }

LeadAsigned Table(Table A) has many status in Table B as Active, Inactive, Pending, Rejected.

I have shown gridview of table A. I also want to show last updated status of each lead from table B in table A’s grid. How can I show that? Also I want to add one dropdown filter of leads status(table B) in table A’s grid so that user can select status from dropdown as active/ inactive/ rejected/ pending and table A’s grid should get filtered depending upon last updated status of that lead from table B. Please help me for this whether my model relation is right and help me to give an idea of doing this.

Thanks in advance.