We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Getting formatted data when exporting from GridGroupingControl to spreadsheet.

Thread ID:





42662 Apr 4,2006 11:27 AM UTC May 31,2006 11:21 AM UTC WinForms 4
Tags: GridControl
Prathima Venkobachar
Asked On April 4, 2006 11:27 AM UTC

Hi, In our application, we have a requirement to export data from GridGroupingControl to an excel spreadsheet. While populating the grid, we are formatting the data so that it displays only 2 decimal places. But when exporting this data to excel sheet, it is not formatted as shown in the grid. Is there any way to get the formatted data in excel sheet? Regards, Prathima

Administrator [Syncfusion]
Replied On April 6, 2006 06:10 AM UTC

Hi Prathima, Sorry for the delayed response and the inconvenience caused. Please refer to the attached sample which allows exporting data from the GridGroupingControl to an Excel spread sheet with the set format in the grid. I have copied the Syncfusion.GroupingGridExcelConverter.cs and made some small changes and it works fine. Let us know if this helps. Regards, Calvin.


Prathima Venkobachar
Replied On April 6, 2006 10:34 AM UTC

Hi Calvin, I tried the property grid[i,j].FormattedText instead of grid[i,j].Text. now its working fine. Thanks, Prathima.

Ronnie Lu
Replied On May 30, 2006 07:09 PM UTC

Hi, Calvin: I changed some lines of code in your sample, and detailed the changes and questiones in the Question.doc in the attached zip file. I also going to create a direct-trac for it. Thanks. - Ronnie Lu, 415-378-2949.


Administrator [Syncfusion]
Replied On May 31, 2006 11:21 AM UTC

Hi Ronnie, Set the Appearance property of the TableDescriptor instead of Table.Appearance. Below is a code snippet. this.gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.Font.Bold = true; this.gridGroupingControl1.TableDescriptor.Appearance.ColumnHeaderCell.HorizontalAlignment = GridHorizontalAlignment.Right; this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.Format = "#,##0.0000"; Let us know if you need any further assistance. Regards, Calvin.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon