CGridview sorting on User-defined column

Hi All,

I have used CGridview to display records. In that CGridview, there is one column as "Total Users" which is not from same model. It will be fetched dynamically by calling one function. Value in that column display correct data. But sorting link is not appear on that column like another column. My code for that column is like :

[i][color="#0D0013"][size="3"]array(

‘name’=>‘totalUsers’,

‘value’ =>’$data->getTotalUsers($data->user_id)’,

‘htmlOptions’=>array(),

),[/size][/color][/i]

In model, a function is written named as [i][color="#0D0013"][size="3"]getTotalUsers, which execute one manual query in DB and return Count.

So, in display, how can I enable sorting functionality?

[/size][/color][/i]