I had created with custom field in yii Cgridview but how to make that sortable. The custom field value is from a function in the model. I want to make this field sortable? Can someone help me?
相关问题
- Yii - Eliminate default controller ID for a module
- how to change csrf field id from YII_CSRF_TOKEN to
- Load balancing with Yii sessions
- Yii uploading pictures
- How to Auto Login and Redirect After Registration
相关文章
- Can you run console jobs from yii2-basic?
- How to do a bulk database insert in Yii2?
- Yii2 - check if the user is logged in view
- Call static method from a string name in PHP
- radioButtonList checked by default
- Postgres error: null value in column “id” - during
- Add column as link in CGridView
- yii : how to ajax update the cgridview
There is a detailed description about searching on custom fields at this URL:
Using standard filters in CGridView custom fields
In the
search
function of your model, wherecustomField
is the name of your field:You may also need to update
rules
andattributeLabels
in your model to reflect the new custom field.