It is possible to use separately the export functionality to Html provided by DataGridView Extension. There are some simple steps outlined below you have to follow.
1. Add reference to the main assembly ‘DataGridViewExtension.dll’ and export dll ‘DGVEHtmlExporting.dll’. The assemblies can be found in folder 'v1.1.1\Bin' in the installation\archive.
2. First ensure you have the following imports:
C#
using CompletIT.Windows.Forms.Export.Html;
VB.NET
Imports CompletIT.Windows.Forms.Export.Html
3. Then add the following code in the event handler that has to perform the export:
C#
DGVEHtmlExportSettings exportSettings = new DGVEHtmlExportSettings();
exportSettings.ExportFileName = ...//Export file name
exportSettings.OpenFileAfterGeneration = true; //Open generated file after export
//Set other settings here...
DGVEHtmlExporter exporter = new DGVEHtmlExporter();
exporter.Export( dataGridView, exportSettings );
VB.NET
Dim ExportSettings As DGVEHtmlExportSettings = New DGVEHtmlExportSettings()
ExportSettings.ExportFileName = ...'Export file name
ExportSettings.OpenFileAfterGeneration = True 'Open generated file after export
'Set other settings here...
Dim Exporter As DGVEHtmlExporter = New DGVEHtmlExporter()
Exporter.Export(Me.DataGridViewControl, ExportSettings)
4. Run your application!