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

<telerik:RadGrid ID="RadGrid1" runat="server" OnExcelMLExportRowCreated="RadGrid1_ExcelMLExportRowCreated">
</telerik:RadGrid>

In the Code behind

protected void Page_Init(object sender, EventArgs e)
{
    RadGrid1.ExcelMLExportRowCreated += RadGrid1_ExcelMLExportRowCreated;
}
Protected Sub Page_Init(sender As Object, e As EventArgs) Handles Me.Init
    AddHandler RadGrid1.ExcelMLExportRowCreated, AddressOf RadGrid1_ExcelMLExportRowCreated
End Sub

The event handler

protected void RadGrid1_ExcelMLExportRowCreated(object sender, GridExportExcelMLRowCreatedArgs e)
{
    RowElement row = e.Row;
    GridExportExcelMLRowType rowType = e.RowType;
    WorksheetElement worksheet = e.Worksheet;
}
Protected Sub RadGrid1_ExcelMLExportRowCreated(ByVal sender As Object, ByVal e As GridExportExcelMLRowCreatedArgs)
    Dim row As RowElement = e.Row
    Dim rowType As GridExportExcelMLRowType = e.RowType
    Dim worksheet As WorksheetElement = e.Worksheet
End Sub
In this article
Not finding the help you need? Improve this article