I am trying to work out the best way of creating a sorting functionalty for my database call.
What I need is a dropdownlist where the user can select how they want there data to be ordered I.e by data ascending or descending order then using ajax preferably it will alter the data automatic or just re-render the page with with a applied get variable for the database call criteria.
I am able to do this by writing out the html form however I want to use the CactiveForm widget or the easiest method to achieve this.
I am also trying to resolve this type of problem.There two text box and one submit button. I just want to need all the cities shows in first text box using autocomplete from database and in second text field shown the related area corresponding to the first text box.
Hm, this can be resolved and implemented in 10 different ways, and it lot depends on your requirements. Notice that all Yii widgets (CListView) are having built in support for sorting, pagination, they are automatically translated to other languages etc. and I find them extremely useful. These widgets can be customized and are very "powerful" in conjunction with CActiveDataProviders and SQLDataProviders.