Sorting 在Ext Js中单击datagrid列标题作为ASC和DESC时如何进行本地排序
我在Ext Js中工作。当我单击列标题按字母顺序排序时,某些本地字符无法正常工作 例如: 艾玛·莎拉·汤姆·厄姆斯 Ş是本地字符 我尝试触发如下“headerclick”事件Sorting 在Ext Js中单击datagrid列标题作为ASC和DESC时如何进行本地排序,sorting,extjs,columnsorting,columnheader,Sorting,Extjs,Columnsorting,Columnheader,我在Ext Js中工作。当我单击列标题按字母顺序排序时,某些本地字符无法正常工作 例如: 艾玛·莎拉·汤姆·厄姆斯 Ş是本地字符 我尝试触发如下“headerclick”事件 listeners: { headerclick : function(grid,col,e){ this.store.setSorterFn(function (record1, record2) { var product
listeners: {
headerclick : function(grid,col,e){
this.store.setSorterFn(function (record1, record2) {
var productLine1 = record1.get(col.formName),
productLine2 = record2.get(col.formName);
return productLine1.localeCompare(productLine2);
});
}
但是当我单击列的标题时,我无法管理排序您不需要处理标题单击您可以使用列的排序器配置处理自定义排序 参考资料:- 希望这对你有帮助