XY Chart NET 3 Control Reference
ExportDataButtonSelected Event
This event is generated whenever the user selects the ExportData toolbar button (see Toolbar).   Use this event to perform operations specific to whenever the ExportData toolbar button is selected.
Syntax
[Visual Basic]
Event ExportDataButtonSelected()
[C#]
ExportDataButtonSelected()
[C++]
ExportDataButtonSelected()
       
Example
' XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

Private Sub XYChartNETCtl1_ExportDataButtonSelected() Handles XYChartNETCtl1.ExportDataButtonSelected
   Dim Row As Integer, Col As Integer
   Dim LineString As String, EntireArrayString As String
   Dim ChartData As Object

   'Do not execute XY Chart NET's internal ExportData method
   XYChartNETCtl1.OverrideExportDataButton = True

   'Copy ChartData array to Clipboard (Tab de-limited)
   ChartData = XYChartNETCtl1.ChartData  
   For Row = 0 To UBound(ChartData)
      LineString = ""
      For Col = 0 To (XYChartNETCtl1.NumProfiles * 2 - 1)
         If Col = 0 Then
            LineString = CStr(ChartData(Row, Col))
         Else
            LineString = LineString + CStr(vbTab) + CStr(ChartData(Row, Col))
         End If
      Next Col
      EntireArrayString = EntireArrayString + vbCrLf + LineString
   Next Row
   Clipboard.SetDataObject(EntireArrayString)  'Copy all to Clipboard

End Sub
                       
                       
See Also

 

 


© 2003 - 2013 ControlEng Corporation. All rights reserved.