Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. ...
  2. columns: [{
  3. header: 'Name',
  4. dataIndex: 'Name',
  5. sortable: true,
  6. doSort: function(state){
  7. var ds = this.up('tablepanel').store;
  8. ds.sort({
  9. property: 'SortOrder',
  10. direction: state
  11. });
  12. }
  13. ....
  14. }]
  15.  
  16. columns: [
  17. {
  18. header: 'Name',
  19. dataIndex: 'Name',
  20. listeners: {
  21. headerclick: function() {
  22. var store = this.up('grid').getStore();
  23. store.sort({
  24. property: 'SortOrder',
  25. direction: this.sortState
  26. });
  27. }
  28. }
  29. }
  30. ]
  31.  
  32. columns: [
  33. {
  34. header: 'Name',
  35. dataIndex: 'Name',
  36. listeners: {
  37. headerclick: function() {
  38. var store = this.up('grid').getStore();
  39. store.sort({
  40. property: 'SortOrder',
  41. direction: this.sortState
  42. });
  43. }
  44. }
  45. }
  46. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement