CompletIT Community Server

Welcome to CompletIT Community Server Sign in | Join | Help

Code Sample: Extending DataGridView control using the DGV Extension

  •  08-31-2007, 1:28 AM

    Code Sample: Extending DataGridView control using the DGV Extension

    In order to extend a DataGridView control with the DGV Extension you have to:

     1. Add reference to the main assembly ‘DataGridViewExtension.dll’ and all export DLLs you wish to be supported by the extension in your application like ‘DGVEExcelExporting.dll’ and/or ‘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.DataGridViewExtension;

    VB.NET
    Imports CompletIT.Windows.DataGridViewExtension


    3. Then, after the creation of the instance to DataGridView control(s) add the following lines:
    C#
    DataGridViewExtensionComponent dgvExtension = new DataGridViewExtensionComponent();
    dgvExtension.SetManagedByExtension( dataGridView,
    true );
    //Manage other grids here ...

    VB.NET
    Dim DGVExtension As DataGridViewExtensionComponent = New DataGridViewExtensionComponent()
    DGVExtension.SetManagedByExtension( Me.DataGridViewControl, True )
    'Manage other grids here ...


    4. Run your application!

View Complete Thread
Powered by Community Server (Personal Edition), by Telligent Systems