Intersoft WebGrid Documentation
Export Event
See Also  Example Send Feedback
ISNet.WebUI.WebGrid Namespace > WebGrid Class : Export Event






Occurs when exporting data from WebGrid is performed.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Behavior")>
<DescriptionAttribute()>
Public Event Export As ExportEventHandler
Visual Basic (Usage)Copy Code
Dim instance As WebGrid
Dim handler As ExportEventHandler
 
AddHandler instance.Export, handler
C# 
[CategoryAttribute("Behavior")]
[DescriptionAttribute()]
public event ExportEventHandler Export
Delphi 
public event Export: ExportEventHandler; 
JScript 
In JScript, you can handle the events defined by another class, but you cannot define your own.
Managed Extensions for C++ 
[CategoryAttribute("Behavior")]
[DescriptionAttribute()]
public: __event ExportEventHandler* Export
C++/CLI 
[CategoryAttribute("Behavior")]
[DescriptionAttribute()]
public:
event ExportEventHandler^ Export

Event Data

The event handler receives an argument of type ExportEventArgs containing data related to this event. The following ExportEventArgs properties provide information specific to this event.

PropertyDescription
DataSource Gets or sets the data source used by the event.
OutputFileName Sets the different file name of output used by the event.
ReportInfo Gets or sets the report information used by the event.
ReturnValue (Inherited from ISNet.WebUI.WebGrid.BaseEventArgs) 
Table Gets or sets the structure of table used by the event.

Example

The code below shows that you can export the text of a cell that uses WebValueList by specifying the EnableValueList property to True in ExportEvent.
C#Copy Code
private void WebGrid1_Export(object sender, ISNet.WebUI.WebGrid.ExportEventArgs e)
{
         e.ReportInfo.EnableValueList = true;
}

Remarks

WebGrid.NET Enterprise allows you to use your own exporting codes or module to handle exporting functionality instead using the built-in exporting feature. When using your own custom exporting, you can skip the inclusion of built-in exporting runtime assemblies. That means WebGrid.NET assembly does not depend on the built-in exporting runtime assemblies on deployment time. This makes the WebGrid.NET totally independent, fully customizable and extensible. For more information you can read Exporting in V5.0.

WebGrid.NET 5.0 Enterprise brings some enhancements on the Exporting Event:

  • Added OutputType property to ReportInfo. The temporary report file name format is now set to use GUID by default. In previous version, the default value is ExecutionTime.
  • Reduced memory usage and fixed leaks. 
  • Exporting is now working properly without default printer installed. The error message like “Printer not Installed” or “PaperKind does not supported” has been completely eliminated.
  • Core engine has been rewritten for better performance.
  • Added CacheToDisk property to ReportInfo. This feature allows the exporting to write temporary cache to disk instead of using memory.
  • Added CacheToDiskLocation property to ReportInfo. You can customize the folder to store the cache. By default, you don’t have to set this property.
  • Improved exporting menu. The export types are now represented with icons.
  • Added exporting command to row/cell context menu. This allows you to easily perform exporting from your current mouse position in the Grid. 

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.