This is a migrated thread and some comments may be shown as answers.

ExportToCsv

3 Answers 136 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Filleau
Top achievements
Rank 1
Filleau asked on 06 Feb 2012, 03:29 PM

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

 

 

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 06 Feb 2012, 03:50 PM
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
0
Filleau
Top achievements
Rank 1
answered on 06 Feb 2012, 04:26 PM
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.

0
Richard Slade
Top achievements
Rank 2
answered on 06 Feb 2012, 04:28 PM
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
Tags
GridView
Asked by
Filleau
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Filleau
Top achievements
Rank 1
Share this question
or