Announcement

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

    Where is formatEditorValue?

    I have a simple integer field type in a ListGrid and I want to suppress zeros so that if the value is zero the cell appears empty. Currently a 0 is shown. The field is editable and I would like the formatting to apply whether the field is being edited or not. I found ListGridField.setCellFormatter() but the documentation for that method says ...
    Note: this formatter will not be applied to the values displayed in cells being edited. The com.smartgwt.client.widgets.grid.ListGridField.formatEditorValue is provided for that purpose.
    But I don't see any mention of "formatEditorValue" in the ListGridField documentation. What am I missing?

    #2
    This could be achieved via an override to the editorProperties for the field but as you point out, the doc's are confusing here, and it'd simpler to achieve via an override at the ListGridField level.

    We've added support for this now. The APIs are ListGridField.setEditValueFormatter() and setEditValueParser(). [They'll show up in the next build].

    Comment


      #3
      Originally posted by Isomorphic_Paul
      This could be achieved via an override to the editorProperties...
      Hi,

      unfortunately the two methods seem not to be available in the current version (at least the version I need to work with). Thus the question: what to override exactly? I am not sure how to override the editorProperties for that. Maybe you can give an example for that? An answer is highly appreciated.

      Thanks in advance!

      Comment

      Working...
      X