New to Telerik UI for ASP.NET AJAXStart 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.Row

        Gets the Row object

      • (GridExportExcelMLRowType) e.RowType

        Gets the ExcelML row type

      • (WorksheetElement) e.Worksheet

        Gets 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;
}

See Also