C# Класс Nettiers.AdventureWorks.Web.UI.GridViewExcelExporter

Exports a gridview to a excel file.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Export ( string reportName, Page currentPage, Control gridView ) : void

Exports the datagrid to an Excel file with the name of the datasheet provided by the passed in parameter

GridViewExcelExporter ( ) : System

Ctor of the GridViewExcelExporter class

Защищенные методы

Метод Описание
ClearChildControls ( System gridView ) : void

Clears the child controls of a EntityGridView to make sure all controls are LiteralControls

OnAfterFormat ( ExcelFormatEventArgs e ) : void

Called when a control is in the scope to be formated

OnBeforeFormat ( ExcelFormatEventArgs e ) : void

Called when a control is in the scope to be formated

Приватные методы

Метод Описание
RecursiveClear ( Control control ) : void

Iterates a control and its children controls, ensuring they are all LiteralControls Only LiteralControl can call RenderControl(System.Web.UI.HTMLTextWriter htmlWriter) method. Otherwise a runtime error will occur. This is the reason why this method exists.

Описание методов

ClearChildControls() защищенный Метод

Clears the child controls of a EntityGridView to make sure all controls are LiteralControls
protected ClearChildControls ( System gridView ) : void
gridView System Datagrid to be cleared and verified
Результат void

Export() публичный Метод

Exports the datagrid to an Excel file with the name of the datasheet provided by the passed in parameter
public Export ( string reportName, Page currentPage, Control gridView ) : void
reportName string
currentPage System.Web.UI.Page
gridView System.Web.UI.Control
Результат void

GridViewExcelExporter() публичный Метод

Ctor of the GridViewExcelExporter class
public GridViewExcelExporter ( ) : System
Результат System

OnAfterFormat() защищенный Метод

Called when a control is in the scope to be formated
protected OnAfterFormat ( ExcelFormatEventArgs e ) : void
e ExcelFormatEventArgs The ExcelFormatEventArgs instance containing the event data.
Результат void

OnBeforeFormat() защищенный Метод

Called when a control is in the scope to be formated
protected OnBeforeFormat ( ExcelFormatEventArgs e ) : void
e ExcelFormatEventArgs The ExcelFormatEventArgs instance containing the event data.
Результат void