Announcement

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

    Removing Sort Numerals

    I've added an initial sort order to a ListGrid via ListGrid.setInitialSort(). This results in Sort Numerals being added to the grid for the sort fields. I'd like to remove those.

    I looked at the ListGrid API, and found the method getSortNumeralHTML(String fieldName, int sortIndex), and its JavaDoc says " If you don't want sort-numerals in the header-buttons, you can override this method to return null or an empty string."

    I did exactly that, and it isn't working. Here is my code:

    Code:
    		final ListGrid listGrid = new ListGrid() {
    			@Override
    			/** We don't want the sort order displayed on the grid header, so return an empty string for them. */
    			public String getSortNumeralHTML(String fieldName, int sortIndex) {
    				return "";
    			}
    		};
    I set a break point on the return line, and it never gets called. Is there a bug here, or am I doing something incorrectly? I'm using SmartGWT Pro 2.5 nightly build from 5/14, Firefox 3.6.17 on Ubuntu 10.04.

    Thanks!
    Chris

    I'm a GWT

    #2
    We've added a new flag, listGrid.showSortNumerals, which will appear in tonight's nightly build - you can drop your override and instead set this new flag to false.

    Comment


      #3
      Thank you! I have tried it, and it works perfectly. It is also a preferable approach to overriding the method in the ListGrid class.

      Comment

      Working...
      X