Own Search Form

I want to make a searching form in which i select the id or name from the dropdown , and it will show the data in a table or grid.If it has more that one column it has to be automatically increase the size of grid.Is it possible.

I am thinking a lot but i dont get any way.

plz

help me with a exmple.

Here is how to prepare dropdown list:

http://www.yiiframework.com/wiki/48/by-example-chtml/#hh5

Here is how to make it work with ajax update:

http://www.yiiframework.com/wiki/429/an-easy-solution-for-dependent-dropdownlist-using-ajax/

http://www.yiiframework.com/wiki/24/

http://www.yiiframework.com/forum/index.php/topic/49177-yii-ajax-update-depending-dropdown-selection/

From this point you can prepare action in controller (explained in links above) that will output CGridView or CListView object with all data you need.