Freeman35 Posted January 7, 2019 Share Posted January 7, 2019 Hello, TUniDBGridColumn column sort Direction (ASC, DESC) how to make unSort ? TUniSortDirections = array of Boolean; type change is hard. But maybe can add "null" option for unSorted. Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted January 8, 2019 Share Posted January 8, 2019 Hi do you want to make columns sortable false? Link to comment Share on other sites More sharing options...
delagoutte Posted January 8, 2019 Share Posted January 8, 2019 no, i think he want a column sort with 3 states for exemple : first click on column header-> ASC Sort second Click on column header -> DESC sort third Click on oclumn header -> NO sort 4th click on column header->ASC SORT . ...... Link to comment Share on other sites More sharing options...
Freeman35 Posted January 8, 2019 Author Share Posted January 8, 2019 @delagoutte Yes you are. (You asked before, I saw it, but no solution, I hope yet) Link to comment Share on other sites More sharing options...
delagoutte Posted January 8, 2019 Share Posted January 8, 2019 now, i have a solution. i'll try to do a small sample project Link to comment Share on other sites More sharing options...
Freeman35 Posted January 8, 2019 Author Share Posted January 8, 2019 Thank you so much. Link to comment Share on other sites More sharing options...
delagoutte Posted January 8, 2019 Share Posted January 8, 2019 i must do a little cleaning but i think it only remains useful code GridColumnSortWithCancel.zip Link to comment Share on other sites More sharing options...
Freeman35 Posted January 10, 2019 Author Share Posted January 10, 2019 @delagoutte, sorry for late answer. Thank you so much for example. You give me extra bonus "position number in order" In "store.load" that code, what for? Link to comment Share on other sites More sharing options...
Freeman35 Posted January 10, 2019 Author Share Posted January 10, 2019 I copied your function "AddFunctionToGrid" but I get error when try your code. I can't see error, so I don't know what is error ? how to find this error ? Thank you. Link to comment Share on other sites More sharing options...
delagoutte Posted January 11, 2019 Share Posted January 11, 2019 No error in console ? have you got a column with checkbox for selection ? if not, try adding, YourGrid.options.dgcheckselect : true; Your column have sortable : true ? for your question about sender.multiSortLimit=10;' -> you couldn't have more than 10 column sorted see doc sencha Link to comment Share on other sites More sharing options...
Freeman35 Posted January 12, 2019 Author Share Posted January 12, 2019 Thank you so much for help, Yes, problem about "dgcheckselect". I'm not use this property so I remove this code "if (me.checkboxModel.views.length > 0) {delta = 1; };" from your js. So, now my app is work without error. I'll continue work on Best regards. Link to comment Share on other sites More sharing options...
Freeman35 Posted January 13, 2019 Author Share Posted January 13, 2019 I found bug in your code, Set column's sorting to descending, then open column menu and click to "Ascending" you will see column been "non sort" Link to comment Share on other sites More sharing options...
delagoutte Posted January 14, 2019 Share Posted January 14, 2019 try this : replace ' sort: function() {'+#13#10+ ... ' if (this.el.hasCls(''x-column-header-sort-DESC'')) {'+#13#10+ by ' sort: function(a) {'+#13#10+ ... ' if (a==null && this.el.hasCls(''x-column-header-sort-DESC'')) {'+#13#10+ Link to comment Share on other sites More sharing options...
Freeman35 Posted January 14, 2019 Author Share Posted January 14, 2019 Its work perfect, thank you so much. Link to comment Share on other sites More sharing options...
Recommended Posts