Reload List View On Drop Down List Selection

The table have following fields- Id, name, address, status(open, closed, pending). In the CList view, i want to add a drop down list in the list view contains all status. On the selection of drop down, i want to reload the list, shows the data corresponding to status.

Thanks.

Try this code inside form




<?php 

    $types=array("1"=>"Type1","2"=>"Type2");

    echo $form->dropDownList($model,'type',$types,

        array(

        'onchange'=>CHtml::ajax(array(

                        'success'=>"$('.search-form form').submit()",

                    )),

                    )

    ); ?>