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. Image for the cookie policy date

Getting formatted data when exporting from GridGroupingControl to spreadsheet.

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

4 Replies

AD Administrator Syncfusion Team 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.

42662.zip


PV Prathima Venkobachar 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.


RL Ronnie Lu 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.

Ronnie_Lu_42662.zip


AD Administrator Syncfusion Team 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.

Loader.
Live Chat Icon For mobile
Up arrow icon