This is a migrated thread and some comments may be shown as answers.

SL RadGridView to Excel- Want the same name to the Excel work sheet as the radGrid in the application

4 Answers 42 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Prithvi
Top achievements
Rank 1
Prithvi asked on 13 Mar 2012, 07:01 AM
Hi,

Can anyone please help me out!!!!!!!!!

The requirement is, want the same name as grid to the work sheet and the default filename  in the Excel.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Mar 2012, 07:44 AM
Hi,

 Have you checked our exporting demo? You can specify desired file name when you open the save dialog. Naming the sheet however is not supported.

Greetings,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Prithvi
Top achievements
Rank 1
answered on 13 Mar 2012, 07:52 AM
No, please give me the link for SL RadGrid export to Excel.


Thanks,
Prithvi
0
Vlad
Telerik team
answered on 13 Mar 2012, 07:54 AM
Hello,

 Here is it:
http://demos.telerik.com/silverlight/#GridView/Exporting

Kind regards,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Prithvi
Top achievements
Rank 1
answered on 13 Mar 2012, 10:06 AM
Hi,

The code is like this:

 

 

public void StructureWorkspaceRadTreeView_Exporting(object sender, GridViewElementExportingEventArgs e)

 

{

 

 

 

if (e.Element == ExportElement.Cell

 

&& e.Value !=

 

null

 

&& e.Value.GetType() ==

 

this.SModel.RecordClassType)

 

{

e.Cancel =

 

true;

 

}

 

 

else if (e.Element == ExportElement.HeaderCell)

 

{

e.Background =

 

Colors.Blue;

 

e.Foreground =

 

Colors.Black;

 

e.FontSize = 50;

e.FontWeight =

 

FontWeights.Bold;

 

}

 

 

else if (e.Element == ExportElement.Cell)

 

{

e.Background =

 

Colors.Green;

 

e.Foreground =

 

Colors.Red;

 

}

 

}



But these changes are not reflecting in the Excel sheet
Tags
GridView
Asked by
Prithvi
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Prithvi
Top achievements
Rank 1
Share this question
or