Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How works SortNormalizer?

    Hello,

    i'm trying to use the SortNormalizer to make a custom sort on a ListGrid. Here is my code:

    Code:
            ListGridField nameField = new ListGridField("name");
            nameField.setSortNormalizer(new SortNormalizer(){
    
    		public double normalize(ListGridRecord record, String fieldName) {
    			return 0;
    		}
            	
            });
    The method 'normalize' returns a double value. Could anyone give a quick example how to use it. I try to sort not just over the 'name' but also over the 'type'. Thank you.

    #2
    SortNormalizer has been updated in SVN to have a return type Object in order to support String comparators.

    Comment


      #3
      Thank you thats works perfectly!! :)

      But it seems that the SortNormalizer has no effect to the sortByProperty method on the grid. Could that be?

      Comment

      Working...
      X