This question is locked. New answers and comments are not allowed.
GOURVEZ JJ
Top achievements
Rank 1
GOURVEZ JJ
asked on 16 Mar 2012, 03:41 PM
Hi,
I use radgridview and I want export to Excel.
All it's ok with your demo, but I want change dateformat.
Does it possible ?
And I have an other question, when I export in Excel format, "return at row" fonction is activate. Does it possible do deactivate function ?
Thanks
I use radgridview and I want export to Excel.
All it's ok with your demo, but I want change dateformat.
Does it possible ?
And I have an other question, when I export in Excel format, "return at row" fonction is activate. Does it possible do deactivate function ?
Thanks
6 Answers, 1 is accepted
0
Hello,
Regarding your first question : You can handle the ElementExporting event. Inside the event handler you can manipulate the data to be sent to the export stream including applying different formatting.
Regarding your second question :
I am not sure what do you mean by "return at a row " function . Can you please elaborate ?
All the best,
Pavel Pavlov
the Telerik team
Regarding your first question : You can handle the ElementExporting event. Inside the event handler you can manipulate the data to be sent to the export stream including applying different formatting.
Regarding your second question :
I am not sure what do you mean by "return at a row " function . Can you please elaborate ?
All the best,
Pavel Pavlov
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
GOURVEZ JJ
Top achievements
Rank 1
answered on 16 Mar 2012, 03:48 PM
Thanks for your answer
For my second question, is "wrap text" option in Excel.
I want deactivate it.
Thanks
For my second question, is "wrap text" option in Excel.
I want deactivate it.
Thanks
0
GOURVEZ JJ
Top achievements
Rank 1
answered on 19 Mar 2012, 09:28 AM
nobody ?
0
GOURVEZ JJ
Top achievements
Rank 1
answered on 19 Mar 2012, 10:26 PM
Hi,
Do you have an example to export date format ?
Because I don't find.
And does it possible to resize width column in ElementExporting event ?
Thanks
Do you have an example to export date format ?
Because I don't find.
And does it possible to resize width column in ElementExporting event ?
Thanks
0
Hello,
Here is some sample c# code. It illustrates where and how to control the width and format the value:
Greetings,
Pavel Pavlov
the Telerik team
Here is some sample c# code. It illustrates where and how to control the width and format the value:
public
MainPage()
{
InitializeComponent();
this
.RadGridView1.ElementExporting +=
new
EventHandler<GridViewElementExportingEventArgs>(RadGridView1_ElementExporting);
}
void
RadGridView1_ElementExporting(
object
sender, GridViewElementExportingEventArgs e)
{
if
(e.Element == ExportElement.Cell)
{
var column = e.Context
as
GridViewDataColumn;
if
(column.UniqueName ==
"MyDateColumn"
)
{
e.Width = 400;
e.Value =
//format the value of the cell here
}
}
}
Greetings,
Pavel Pavlov
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
GOURVEZ JJ
Top achievements
Rank 1
answered on 22 Mar 2012, 10:14 AM
Hi,
I have problem with format value.
This is my code :
Can you help me ?
thanks
I have problem with format value.
This is my code :
e.Value =
String.Format("{0:dd/MM/yy}", e.Value);
Can you help me ?
thanks