Wednesday, November 24, 2010

ExtJS Datagrid column sortable

I've just realized that if you dont set id for the columns of the datagrid,
the sorting option for the column will be disabled by default, even with sortable set to true.

,columns: [
{id:'id', header: _("id"), width: 80, sortable: true, dataIndex: 'id'},
{id:'pagetitle', header: _("pagetitle"), width: 400, sortable: true, dataIndex: 'pagetitle'}
]

Hope this help you save hours of debugging :)
cheers~

No comments: