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.
Unfortunately, activation email could not send to your email. Please try again.

Getting formatted data when exporting from GridGroupingControl to spreadsheet.

Thread ID:

Created:

Updated:

Platform:

Replies:

42662 Apr 4,2006 07:27 AM May 31,2006 07:21 AM Windows Forms 4
loading
Tags: GridControl
Prathima Venkobachar
Asked On April 4, 2006 07:27 AM

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 02:10 AM

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.

42662.zip

Prathima Venkobachar
Replied On April 6, 2006 06:34 AM

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 03:09 PM

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.

Ronnie_Lu_42662.zip

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

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.

CONFIRMATION

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.

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.

;