Ticket Q439420
Visible to All Users
Duplicate

ASPxGridViewExporter don't translate enums

created 12 years ago

Good afternoon,

I have version 10.1.7 of DevExpress, and I have a function that exports to Excel one ASPxGridView to Excel with the following code:

ASPxGridViewExporter exporter = new ASPxGridViewExporter();
((Control)View.Control).Controls.Add(exporter);

ASPxGridView gridView = (ASPxGridView)((ListView)View).Editor.Control;

exporter.GridViewID = gridView.ID;

exporter.Styles.Header.Font.Bold = true;
exporter.Styles.Default.Font.Name = "Arial";

exporter.WriteXlsToResponse("report");

The export makes it correctly, but in the resulting Excel, enums are not translated when the ASPxGridView if translated into the language of the customer.

I made the translations in the model of module of module.web and web, the 3 projects we have in our solution.

I can help get the enums out translated in the resulting Excel?

thank you very much

Answers

created 12 years ago (modified 12 years ago)

Hello Manel,
By default, our exporting engine does not process localized values, because custom ITemplate objects are used for grid columns.
You will have to handle the ASPxGridViewExporter.RenderBrick event as suggested in the OBSOLETE - How to export data from the Grid and Tree List Editors in XAF ASP.NET applications example. I hope this helps.

    Comments (2)

      Good morning,
      Thanks for the solution, we will study the possibility to upgrade the version of DevExpress, because we working with version 10.1.7 and the solution indicates that in the version 11.2 the bug is fixed.
      thank you very much

      Dennis Garavsky (DevExpress) 12 years ago

        Manel, I am afraid even though the exporting engine is significantly improved in 12.1, it is still required to handle the RenderBrick event in this version as I suggested above.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.