Hi,
I have a DS defined as follows:
I'd like to export all data into excel sheet filtered by the grid's filters.
When I export this file the problem is that valueMap is not applied form the DS definition neither the displayfied from DS definition is applied.
When I change it to
then i works fine, but it exports only data currently loaded in the client. Sometimes users can export ten thousand lines so it is generaly not a good idea to load them up first.
It would slow down the whole system.
Can you help me with this? What am I supposed to set? It's pointless to show primary keys from related objects in excel.
2) Is there an override point where I could put my code in order to get the excel object before it is returned to the client?
I'd like to make some post modification to it.
a) I'd like to freeze the header row so that when scrolling the header row would be always visible.
b) I'd like to make the header line bold.
In a DMI class I can override fetch, update, add,... operations, is there something like export operation?
thank you for a quick response,
Zdary
I use smartGWT 3.0 PRO 7.11.2011
I have a DS defined as follows:
Code:
... <field name="regionDisplayText" type="text" valueXPath="locCountryregions/name" hidden="true"></field> <field name="regionId" type="integer" foreignKey="regionsDS/id" valueXPath="locCountryregions/id" displayField="regionDisplayText"></field> <field name="active" type="boolean" > <valueMap> <value ID="true"><fmt:message key="active"/></value> <value ID="false"><fmt:message key="inactive"/></value> </valueMap> </field> ...
Code:
DSRequest dsRequestProperties = new DSRequest(); dsRequestProperties.setExportAs(ExportFormat.XLS); dsRequestProperties.setExportDisplay(ExportDisplay.DOWNLOAD); dsRequestProperties.setExportFilename("users.xls"); dsRequestProperties.setExportFields(new String[]{regionField.getName(), activeField.getName()}); dsRequestProperties.setExportValueFields(false); userGrid.exportData(dsRequestProperties);
When I change it to
Code:
userGrid.exportClientData(dsRequestProperties);
It would slow down the whole system.
Can you help me with this? What am I supposed to set? It's pointless to show primary keys from related objects in excel.
2) Is there an override point where I could put my code in order to get the excel object before it is returned to the client?
I'd like to make some post modification to it.
a) I'd like to freeze the header row so that when scrolling the header row would be always visible.
b) I'd like to make the header line bold.
In a DMI class I can override fetch, update, add,... operations, is there something like export operation?
thank you for a quick response,
Zdary
I use smartGWT 3.0 PRO 7.11.2011
Comment