Extending CSort


I need to change the sort link in CGridView, generated from CDataColumn which uses the CSort class to create the sortable link in the header. If I extend the CSort class to change the link function can you show me how I would incorporate the new sub class for use within CGridView/CDataColumn?

Many thanks!

I am also looking for a similar solution. The url that is created by @link in CSort class is actually reverse i.e the column clicked second for sorting comes before the column clicked first for sorting. I can extend the CSort Class and override the link method with below changes, but how can I tell CGridView(CDataProvider,CDataColumn etc) to use my extended class rather than CSort





I see a setSort method in CDataProvider thinking this might be the solution. This method in turn calls getSort method which again creates a CSort object(hard coded). Googled a lot to find a proper solution, so no success as of now

you can override the Csort class, place it into components folder and use it when u requried to show sort