New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Represents a TreeListColumn extended to perform calculations upon fields from the data source.

Definition

Constructors

TreeListCalculatedColumn Constructor

C#
public TreeListCalculatedColumn()

Properties

Gets or sets the field name from the specified data source to bind to the TreeListBoundColumn.

C#
public virtual TreeListAggregateFunction Aggregate { get; set; }
Property Value:

A string, specifying the data field from the data source, from which to bind the column.

Gets or sets a whether the column data can be sorted.

C#
public virtual bool AllowSorting { get; set; }
Property Value:

A boolean value, indicating whether the column data can be sorted.

Gets or sets a string, representing a comma-separated enumeration of DataFields from the data source, which will form the expression.

C#
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
[TypeConverter(typeof(GridStringArrayConverter))]
public virtual string[] DataFields { get; set; }
Property Value:

A string, representing a comma-separated enumeration of DataFields from the data source, which will form the expression.

Gets or sets the string used for formatting the calculated column value.

C#
public virtual string DataFormatString { get; set; }

Gets or sets (see the Remarks) the type of the data from the DataField as it was set in the DataSource.

C#
[TypeConverter(typeof(GridDataTypeConverter))]
public Type DataType { get; set; }

The DataType property supports the following base .NET Framework data types:

  • Boolean
  • Byte
  • Char
  • DateTime
  • Decimal
  • Double
  • Int16
  • Int32
  • Int64
  • SByte
  • Single
  • String
  • TimeSpan
  • UInt16
  • UInt32
  • UInt64

Gets or sets a string representing the expression used when calculating the column values.

C#
public virtual string Expression { get; set; }

Gets or sets a string used for formatting the footer aggregate text.

C#
public virtual string FooterAggregateFormatString { get; set; }

Should override if sorting will be disabled

C#
protected override bool Sortable { get; }

Overrides: TreeListColumn.Sortable

Methods

C#
protected virtual string FormatDataValue(object dataValue)
Parameters:dataValueobjectReturns:

string

By default returns the SortExpression of the column. If the SortExpression is not set explicitly, it would be calculated, based on the DataField of the column.

C#
protected override string GetSortExpression()
Returns:

string

Overrides: TreeListColumn.GetSortExpression()

C#
protected override void InitializeDataCells(TableCell cell, int columnIndex, TreeListDataItem inItem)
Parameters:cellTableCellcolumnIndexintinItemTreeListDataItem

Overrides: TreeListColumn.InitializeDataCells(TableCell, int, TreeListDataItem)

C#
protected override void InitializeFooterCells(TableCell cell, int columnIndex, TreeListFooterItem inItem)
Parameters:cellTableCellcolumnIndexintinItemTreeListFooterItem

Overrides: TreeListColumn.InitializeFooterCells(TableCell, int, TreeListFooterItem)

C#
protected virtual void OnColumnDataCellBinding(object sender, EventArgs e)
Parameters:senderobjecteEventArgs