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.


help me with a exmple.

Here is how to prepare dropdown list:


Here is how to make it work with ajax update:




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.