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

Grid Grouping control - Export to excel issue

Thread ID:

Created:

Updated:

Platform:

Replies:

102027 Dec 15,2011 05:42 AM UTC Jan 18,2012 02:38 PM UTC ASP.NET Web Forms (Classic) 5
loading
Tags: GridGroupingControl
Vijay Jayaraj
Asked On December 15, 2011 05:42 AM UTC

Hi,

I am using GridGroupingControl and binding the data table in the page load. There are more customizations depening on the logic with respect to the grid column values. Iam able to bind the data and customize it. But when i export the grid to excel/word i don't have the actual values in the grid. I am gettting the values which are there in the datable.

//In Page load im binding the datatable to the grid.
//This datatable has been customized to display, like
//making some of the date calculations and hyperlink coloumns

protected void Page_Load(object sender, EventArgs e)
{

this.GridGroupingControl1.DataSource = GetAllProjects();//This is a datatable
GridGroupingControl1.ShowSearchBox = true;
this.GridGroupingControl1.ShowGroupDropArea = true;
}

//Export to excel
protected void btnExportExcel_Click(object sender, EventArgs e)
{
GridExcelExport excel = new GridExcelExport(this.GridGroupingControl1, "excel.xls");
excel.ExportNestedTable = true;
excel.Export();

}

How should i proceed to export the grid with latest changes instead of raw datatable to excel.



Eswari S [Syncfusion]
Replied On December 21, 2011 07:17 AM UTC

Hi Vijay,

Thank you for using Syncfusion products.

Query #1 : when i export the grid to excel/word i don't have the actual values in the grid

By default , actual values which is persisted in grid ( latest Updated value , sorting , etc ) will be exported to the excel/word except unbound columns like ( eg ,hyperlink columns ). We can only export the bound columns to the excel/word .If you would like to export the visible rows of grid in current page , you need to set the property ConverterOptionsExt.Visible. Please refer to the following code snippets:

protected void Button2_Click(object sender, EventArgs e)
{
GridWordExport excel = new GridWordExport(this.GridGroupingControl1, "WordDoc.docx",ConverterOptionsExt.Visible); // set ConverterOptionsExt.Visible
excel.ExportNestedTable = true;
excel.Export();

}

We have prepared the video demonstrating the working of the sample and the same can be downloaded from the following link.

Sample Link:

ExcelExport Issue312164948.zip

Video Link:

Video1936521315.zip

Also, we would request you to check our online sample link:

http://asp.syncfusion.com/sfaspnetsamplebrowser/9.4.0.62/Web/Grid.Grouping.Web/Samples/4.0/Export%20and%20Print/Word%20Export/CS/WordExport.aspx


Please try this and let us know if you have any other queries.

Regards,
Eswari.S



Vijay Jayaraj
Replied On January 5, 2012 06:06 AM UTC

I got it resolved by the "ConverterOptionsExt" properties, however i am not able to get the grid footer in the excel when i export the grid.

I need to provide legends at the bottom of all the records in the excel sheet along with summaries.

Please suggest.


Ranjithkumar R G [Syncfusion]
Replied On January 10, 2012 10:35 AM UTC

Hi Vijay ,

Thanks for your update.

We are sorry for inconvenience caused. We are unable to reproduce the issue. We have prepared a simple sample and the same can be downloaded from the following link.

http://www.syncfusion.com/downloads/Support/DirectTrac/88902/ExcelExport%20Issue348156241.zip

Could you please try the above sample and get back to us whether you are able to reproduce the issue? If not, could you please give more information or by reproducing the issue in the above sample so that we could sort out the issue and provide you with solution. The information provided would be of great help in resolving the issue.

Please let us know if any concerns.

Regards,
Ranjithkumar



Vijay Jayaraj
Replied On January 16, 2012 10:06 AM UTC

Thanks Ranjith, that works great but the caption text was distorted.

- Vijay


Ranjithkumar R G [Syncfusion]
Replied On January 18, 2012 02:38 PM UTC

Hi Vijay,

Thanks for your update.

We are sorry for inconvenience caused. We are unable to reproduce the issue. We have prepared a simple sample and the same can be downloaded from the following links.

Sample link:
http://www.syncfusion.com/downloads/Support/DirectTrac/88902/ExcelExport%20Issue348156241.zip

Could you please try the above sample and get back to us whether you are able to reproduce the issue? If not, could you please give more information or by reproducing the issue in the above sample so that we could sort out the issue and provide you with solution. The information provided would be of great help in resolving the issue.

Please let us know if any concerns.

Regards,
Ranjithkumar



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.

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

;