New to Telerik UI for WinFormsStart a free 30-day trial

Common helper class. Implements most of ICommonDataHelper members

Definition

Namespace:Telerik.Charting

Assembly:Telerik.WinControls.RadChart.dll

Syntax:

C#
public abstract class DataHelper

Inheritance: objectDataHelper

Derived Classes: DataTableDataHelper

Constructors

C#
protected DataHelper()

Properties

Returns true if data source supports columns naming or false in other cases

C#
public abstract bool ColumnNameSupported { get; }

Returns the data source columns count

C#
public abstract int ColumnsCount { get; }

Returns the data source rows count

C#
public abstract int RowsCount { get; }

Methods

Gets the column index by column name in the Data Source object

C#
public abstract int GetColumnIndex(string columnName)
Parameters:columnNamestring

Column name

Returns:

int

Column index if column found or -1 if column not found

Remarks:

This method is not supported by all data sources

Gets the column name if it is supported by data source

C#
public abstract string GetColumnName(int columnIndex)
Parameters:columnIndexint

Column index

Returns:

string

Column name if supported by a data source

Return the double value at the given row and column

C#
public double GetDoubleValue(int rowIndex, int columnIndex)
Parameters:rowIndexint

Row position index

columnIndexint

Column index

Returns:

double

Double value at given column and row

Return unique column's content

C#
public object[] GetFilteredColumn(int columnIndex)
Parameters:columnIndexint

Column index

Returns:

object[]

Objects array with unique column values

Returns all possible data source columns that could be used as Gantt series items

C#
public int[] GetGanttValuesColumns()
Returns:

int[]

Data source columns array available for a Gantt series data binding

Returns possible groups column used for automatic data binding

C#
public int GetGroupsColumnIndex()
Returns:

int

Automatically found possible column with repeating values for a data grouping

Remarks:

Only the first found numeric column will be checked. If such column is not found or does not contain repeatable values the -1 will be returned

Returns possible column used as labels source when group column present

C#
public int GetLabelsColumnIndex(int groupColumn)
Parameters:groupColumnint

DataGroupColumn index in a data source

Returns:

int

Column index that can be used as a series item labels source

Return the object value at the given row and column

C#
public abstract object GetObjectValue(int rowIndex, int columnIndex)
Parameters:rowIndexint

Row position index

columnIndexint

Column index

Returns:

object

Object value at given column and row from data source

Return sorted unique column's content

C#
public object[] GetSortedAndFilteredColumn(int columnIndex)
Parameters:columnIndexint

Column index

Returns:

object[]

Objects array with unique column values sorted ascending

Return the string value at the given row and column

C#
public string GetStringValue(int rowIndex, int columnIndex)
Parameters:rowIndexint

Row position index

columnIndexint

Column index

Returns:

string

String value at given column and row of a data source

Gets possible series items X values column

C#
public int GetValuesXColumnIndex()
Returns:

int

Possible series items X values column's index or -1 if no proper column found

Gets possible series items Y values column

C#
public int GetValuesYColumnIndex()
Returns:

int

Possible series items Y values column's index or -1 if no proper column found

Returns all possible series items Y values columns

C#
public int[] GetValuesYColumns()
Returns:

int[]

Possible numeric columns array available for a data binding

Returns true if given column contains numeric values

C#
public abstract bool IsColumnNumeric(int columnIndex)
Parameters:columnIndexint

Column index

Returns:

bool

True if data source column contains numeric values

Returns true if given column contains string type values

C#
public abstract bool IsColumnString(int columnIndex)
Parameters:columnIndexint

Column index

Returns:

bool

True if data source column contains string values

Returns true if value at the given position is numeric

C#
public bool IsItemNumeric(int rowIndex, int columnIndex)
Parameters:rowIndexint

Row position index of data item in a data source

columnIndexint

Column index of data item in a data source

Returns:

bool

True if data item contains numeric value at given row and column

Checks is given type is Nullable

C#
protected static bool IsNullableType(Type type)
Parameters:typeType

Type to check

Returns:

bool

True if type is Nullable, or False

Checks whether the type given is numeric

C#
protected static bool IsTypeNumeric(Type type)
Parameters:typeType

Type to check

Returns:

bool

True if Type is numeric

Checks whether the type given is string type

C#
protected static bool IsTypeString(Type type)
Parameters:typeType

Type to check

Returns:

bool

True if given type is string

Checks whether the value's type is String

C#
protected static bool IsValueString(object obj)
Parameters:objobject

Object to check

Returns:

bool

True if object can be converted to string