Export ListGrid in SmartGWT

569 views
Skip to first unread message

gopal bhalala

unread,
Jun 14, 2010, 4:27:49 AM6/14/10
to google-we...@googlegroups.com
I am using exportData on listGrid...Its working fine if i have only normal fields like text. But I have a problem with date field (without time). My exported data comes with time value (ex. 01/06/10 00:00:00 ) but I use "EuropeanShortDate" in data source.

I need only date value in exported data file.

Please suggest us that how I remove time (00:00:00) value and also how I make date field as customized.

Below is snippet of my code.

Datasource:
..............
<field name="DOB" title="DOB" type="date" useTextField="true" textAlign="LEFT" dateFormatter="toEuropeanShortDate" />
..................
.................

Code:
(1) DSRequest dsRequestProperties = new DSRequest();
(2) dsRequestProperties.setExportAs( (ExportFormat) EnumUtil.getEnum
(ExportFormat.values(), "csv"));
(3) dsRequestProperties.setExportDisplay(ExportDisplay .DOWNLOAD);
(4) cmps.gamesTree.childList.getField ("crew_in_date").setType(ListGridFieldType.DATE );
(5) cmps.gamesTree.childList.exportData(dsRequestPrope rties);


Thanking you,
Gopal Bhalala

Sanjiv Jivan

unread,
Jun 15, 2010, 5:29:04 AM6/15/10
to google-we...@googlegroups.com
Hi Gopal,
Please post Smart GWT related questions on the Smart GWT forum : http://forums.smartclient.com/forumdisplay.php?f=14

Thanks,
Sanjiv

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Reply all
Reply to author
Forward
0 new messages