Optgroup In Chosen Extension


How we can be handle optgroup in chosen extension. I want dropdownlist in following format:

<optgroup label="BS">

<option>Javed Iqbal Hunzai</option>

<option>Aslam Karim</option>


<optgroup label="MS">

<option>Junaid Iqbal</option>

<option>Ubaid Ali</option>


I have used chosen using following line of code:

echo Chosen::activeDropDownList($model, 'student_id', CHtml::listData(Common::getListStudent(), 'id', 'name'));

where Common::getListStudent() returns following array:



    [0] => Array


            [name] => Javed Iqbal Hunzai

            [id] => 25



    [1] => Array


            [name] => Ubaid Ali

            [id] => 26