Announcement

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

    Export displayField / ValueMap text

    I have a datasource with some fields defined like so:

    Code:
    <field name="JOB_REQ_STATUS_UK" type="select">
        <valueMap>
            <value ID="1">Open</value>
            <value ID="3">Closed</value>
        </valueMap>
    </field>
    and I drop it on a grid:

    Code:
        ListGridField status = new ListGridField("JOB_REQ_STATUS_UK");
    Which of course causes the valueMap's text values to be displayed in my grid instead of the key.

    When I export the grid's contents (I've tried a few ways, but here's what I have now)

    Code:
      DSRequest dsRequestProperties = new DSRequest();  
      dsRequestProperties.setExportAs(ExportFormat.CSV);  
      dsRequestProperties.setExportDisplay(ExportDisplay.DOWNLOAD);  
      grid.exportClientData(dsRequestProperties);
    I get the keys (1/3) instead of the text (Open/Closed). Is there a trick to influencing the value that gets exported? I've looked at the showcase, the forums, and the javadoc but can't seem to find what I'm looking for...

    #2
    Sales people like spreadsheets. :-)

    We're evaluating SmartGWT client and server frameworks, and I could really use some help with this before my demo tomorrow.

    Thanks in advance.

    Comment


      #3
      This is now fixed - try the next nightly build (Feb 24) and you should see the display values getting picked up rather than the keys.

      Comment

      Working...
      X