New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
OnExcelMLExportRowCreated Event
Fired when RadGrid is exported to native Excel before the resulting document is rendered on the client.
Event Parameters
-
(object)
sender- The control that fires the event
-
(GridExportExcelMLRowCreatedArgs)
e-
Event arguments
-
(RowElement)
e.RowGets the Row object
-
(GridExportExcelMLRowType)
e.RowTypeGets the ExcelML row type
-
(WorksheetElement)
e.WorksheetGets the parent worksheet element
-
-
Attaching the event
In the Markup
ASP.NET
<telerik:RadGrid ID="RadGrid1" runat="server" OnExcelMLExportRowCreated="RadGrid1_ExcelMLExportRowCreated">
</telerik:RadGrid>
In the Code behind
C#
protected void Page_Init(object sender, EventArgs e)
{
RadGrid1.ExcelMLExportRowCreated += RadGrid1_ExcelMLExportRowCreated;
}
The event handler
C#
protected void RadGrid1_ExcelMLExportRowCreated(object sender, GridExportExcelMLRowCreatedArgs e)
{
RowElement row = e.Row;
GridExportExcelMLRowType rowType = e.RowType;
WorksheetElement worksheet = e.Worksheet;
}