ExportToCsv

4 posts, 1 answers
  1. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 06 Feb 2012 Link to this post


    Hi,

    I have a problem with the last release of WinForms.

    The line :

    Dim csvexporter As ExportToCSV = New ExportToCSV(Me.RadGridView1)

    display an error ExportToCSV is  not defined.

    My code came from your help so I don't understand.

     

    Imports System.IO
    Imports System.Data.OleDb
    Imports Telerik.WinControls.UI.Localization
    Imports System.Runtime.InteropServices
    Imports Telerik.WinControls.UI
    Imports Telerik.WinControls
    Imports Telerik.WinControls.Data
    Imports Telerik.WinControls.UI.Export
    Imports System.Net.NetworkInformation
     
     
     
     
      Private Sub RadButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButton2.Click
            Dim csvexporter As ExportToCSV = New ExportToCSV(Me.RadGridView1)
            SaveFileDialog1.RestoreDirectory = True
     
            If SaveFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
                csvExporter.RunExport(SaveFileDialog1.FileName)
            End If
     
        End Sub

     

     

     

    Can you help me please ?
    Thanks

    Anthony

     

     

     

  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 06 Feb 2012 Link to this post

    Hello,

    You have the correct namespace imported (Telerik.WinControls.UI.Export, Telerik.WinControl.Data) but you may be missing reference to an assembly. This namespace is part of the TelerikData.dll
    You can see more information about this in this help topic

    Hope that helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Filleau
    Filleau avatar
    114 posts
    Member since:
    Jun 2006

    Posted 06 Feb 2012 Link to this post

    Thanks.
    In fact TelerikData.dll was in references.
    But I don't know why refrence was showed as 0.0.0.0 release...
    So I must delete it, and declare a new reference.

  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 06 Feb 2012 Link to this post

    Hi,

    It would have changed after an upgrade as the new path is different if you are looking for the reference in a folder path.
    Glad that helped
    Richard
Back to Top