I know this is not a bug, but a feature request, but since I don't have permissions to post there, I'll post it here...
I always run into a problem with grids, ordering and sorting. The problem is very common, you are displaying in a grid a field from another object, so you show the name of the object, but filter by it's id. Your column config is something like:
The problem comes when you want to sort, now if you put sortable:true then you will be sorting by id not name (which is what a user expects). You could change the dataIndex to "category_name", but then the filter would be in the wrong field. So the thing is that you can't specify different fields for sorting and filtering in a column.
This can be solved in two ways, adding some config to the filter to specify which column should filter or add a config to the sorting. It tried it both, but since the code for the filtersfeature is still in development (in ext 4.0.2RC it's different than in RC1) I figured it was simpler to do it for the sorting. Here's the override:
As you can see you can specify an additional option for the column 'sortIndex' that specifies which field to use. It could be implemented by passing the field in the 'sort' config, but that may break some applications that for some reason are sending a string in the sortable config.
Is there any possibility of adding this to ext core??