Author Topic: Silent Sort  (Read 2176 times)

nebels

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 12
    • View Profile
Silent Sort
« on: November 23, 2016, 04:31:50 am »
Hello there,

We have grid which should NOT be sort-able by the users (i.e. sortModel.on=false), but I have to sort the grid in a certain way after each insert etc.
 
Things work just fine by using the sort method - the only challenge I have is that I do NOT want to have the visual sort indicator in the column heading being displayed.  I can obviously use CSS  to 'display:none' the triangle, but this still leaves the column heading in a active state ... and honestly it is bit messy.

What you recommend.

Thanks heaps in advance

S

PS: We are still on 3.2
« Last Edit: November 23, 2016, 04:34:03 am by nebels »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Silent Sort
« Reply #1 on: November 23, 2016, 10:41:20 am »
I see the need of a configuration option to turn off visual sort indicator in absence of which

Either the active state class (ui-state-active) has to be removed from header cell in addition to visual sort icon.

or native Array sort method can be used to sort the data of grid without using the sortModel.sorter

http://jsfiddle.net/y28vwe74/

nebels

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Silent Sort
« Reply #2 on: November 23, 2016, 11:27:46 am »
thanks heaps for your quick reply - did not think of the native sort ...