How To Manipulate Yii Dropdownlist

Hello

I am a newbie in Yii and my big problem is how to pick the data from the dropdownlist and manipulate it for example use the depid from the 1st dropdownlist(populated from the db table called department) and compare it with fk on employees table and display all employees in that department into the second dropdownlist.

someone to help me please.

regards