.netCHARTING v10.5 Documentation
Example 


dotnetCHARTING Namespace > SeriesCollection Class > GetProcessedDataTable Method : GetProcessedDataTable(String,Boolean,Boolean) Method
GetProcessedDataTable(String,Boolean,Boolean) Method
Returns a DataTable of processed data.
Syntax
'Declaration
 
Public Overloads Function GetProcessedDataTable( _
   ByVal tokenTemplate As String, _
   ByVal transposeData As Boolean, _
   ByVal addSeriesName As Boolean _
) As DataTable
'Usage
 
Dim instance As SeriesCollection
Dim tokenTemplate As String
Dim transposeData As Boolean
Dim addSeriesName As Boolean
Dim value As DataTable
 
value = instance.GetProcessedDataTable(tokenTemplate, transposeData, addSeriesName)
public DataTable GetProcessedDataTable( 
   string tokenTemplate,
   bool transposeData,
   bool addSeriesName
)

Parameters

tokenTemplate
transposeData
addSeriesName

Return Value

Returns a data table of the processed data.Returns a data table of the processed data.
Remarks
This method usually called in PostDataProcessing event handler method when data generated dynamically from a database. Then, the datatable can be displayed with dataGrid or other controls.
Example
The follwoing sample, get a data table and displays with a datagrid. For complete sample see features/PostDataProcessing.aspx
//This line should add in Page_Load method
Chart.PostDataProcessing +=new PostDataProcessingEventHandler(OnPostDataProcessing);
 
//The method handling the PostDataProcessing event
void OnPostDataProcessing(Object sender)
{
    DataTable dt = Chart.SeriesCollection.GetProcessedDataTable("%YValue",true,true);
    chartdatagrid.DataSource = new DataView(dt);
    chartdatagrid.DataBind();
 
}
'This line should add in Page_Load method
AddHandler Chart.PostDataProcessing, AddressOf OnPostDataProcessing
 
 
'The method handling the PostDataProcessing event
Sub OnPostDataProcessing(sender As [Object])
   Dim dt As DataTable = Chart.SeriesCollection.GetProcessedDataTable("%YValue", True, True)
   chartdatagrid.DataSource = New DataView(dt)
   chartdatagrid.DataBind()
End Sub 'OnPostDataProcessing
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also