This is a migrated thread and some comments may be shown as answers.

Export Excel Date Format Lost

0 Answers 65 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Wang
Top achievements
Rank 1
Wang asked on 06 Aug 2012, 03:34 AM
Hi Guys,
    At first , please let me simply introduce my project state . 

    server-side : wcf service (data service layer \ data interface layer)
    client-side   : silverlight4.0 (referred assembly: Telerik.Windows.Controls 2011.2.712.1040 \Telerik.Windows.Controls.GridView 2011.2.712.1040)  

    About GridView Export Function , please see the following main code :
   
               SaveFileDialog dialog = new SaveFileDialog();
           dialog.DefaultExt = extension;
           dialog.Filter = String.Format("{1} files (*.{0})|*.{0}|All files (*.*)|*.*", extension, selectedItem);
           dialog.FilterIndex = 1;
           if (dialog.ShowDialog() == true)
           {
               using (Stream stream = dialog.OpenFile())
               {
                   GridViewExportOptions exportOptions = new GridViewExportOptions();
                   exportOptions.Format = format;
                   exportOptions.ShowColumnHeaders = true;
                   radgridview.Export(stream, exportOptions);
               }
           }
         
         At this moment , the issue i have faced was the datetime value displayed abnormally . please see the illustration by attachment.
        Should I set the gridview some export option or else ? How to solve it ?

        please give me some advices , I am looking forward to your help .
        thanks.
Tags
GridView
Asked by
Wang
Top achievements
Rank 1
Share this question
or