When you set a column in the table as follows:
{ display: ‘ID‘, name: ‘ORDER_ID‘, width: 40, sortable: false, align: ‘left‘}
This column will not have the abbr attribute
To solve this problem
1. Open FlexGrid. js
2. find such a piece of code
if (cm.name && cm.sortable) { $(th).attr(‘abbr‘, cm.name);}
Change it
if (cm.name) { $(th).attr(‘abbr‘, cm.name);}
In this way, all columns will have the abbr attribute, but all columns at the same time (even if the value of the sortable attribute is set to false) will still display the sorting effect. How can I delete all the sorting effects?
Find this code
changeSort: function (th) { //change sortorder if (this.loading) { return true; } $(g.nDiv).hide(); $(g.nBtn).hide(); if (p.sortname == $(th).attr(‘abbr‘)) { if (p.sortorder == ‘asc‘) { p.sortorder = ‘desc‘; } else { p.sortorder = ‘asc‘; } } $(th).addClass(‘sorted‘).siblings().removeClass(‘sorted‘); $(‘.sdesc‘, this.hDiv).removeClass(‘sdesc‘); $(‘.sasc‘, this.hDiv).removeClass(‘sasc‘); $(‘div‘, th).addClass(‘s‘ + p.sortorder); p.sortname = $(th).attr(‘abbr‘); if (p.onChangeSort) { p.onChangeSort(p.sortname, p.sortorder); } else { this.populate(); }},
Delete it, and then delete the code that calls the function later <this method G. changesort (this) is called in one place;>
You can solve this problem.
The reason why the abbr attribute does not exist when the sortable in FlexGrid is set to false and the Solution