GridGroupByField
Field which is part of each SelectFields and GroupByFields collection
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.GridView.dll
Syntax:
public class GridGroupByField : NotifyPropertyBase, INotifyPropertyChangingEx, INotifyPropertyChanged
Inheritance: objectNotifyPropertyBaseGridGroupByField
Implements:
Inherited Members
Constructors
Initializes a new instance of the GridGroupByField class.
public GridGroupByField()
Initializes a new instance of the GridGroupByField class with a name of a field.
public GridGroupByField(string fieldName)
The name of a field from the data source.
Fields
protected object aggregateResult
The default format string for the field.
public static readonly string DefaultFormatString
The default format string for the field.
public static readonly string FieldDefaultFormatString
Properties
Gets or sets aggregate function (from GridAggregateFunction enumeration values) that will be applied on the grouped data.
[Browsable(true)]
public virtual GridAggregateFunction Aggregate { get; set; }
Returns the result from currently used aggregate function. This property defaults to GridAggregateFunction.None
Meaningful only for fields in the SelectFields collection.
Gets or sets a value to be stored in the data source if the control value is null or empty.
[Browsable(false)]
public virtual object DataSourceNullValue { get; set; }
Gets or sets the data type of the field.
[Browsable(false)]
public virtual Type DataType { get; set; }
Gets or sets an expression for this field.
public virtual string Expression { get; set; }
Gets or sets a value representing a friendly name for the field used for forming the group by expression. This name will be displayed in each group header when grouping by the respective field.
[Browsable(true)]
public virtual string FieldAlias { get; set; }
String representing the friendly name shown
Use this property for setting the field text that will be displayed in the GridGroupHeaderItem. If this property is not set, the value of FieldName property will be used. Note that this property has a meaning only for GridGroupByField part of the SelectFields of GridGroupByExpression.
This property is useful in cases when:
- you want to change the value displayed in group header (different than
the default FieldName column value)
or - group by a template column and RadGridView cannot get the header text for that column.
Gets or sets the name data source property or database column from a data source.
[Browsable(true)]
public virtual string FieldName { get; set; }
Gets or sets the instance of FilterExpression for this field.
public virtual FilterExpression Filter { get; set; }
public string FormatString { get; set; }
Gets or sets the expression that will be displayed in the GridGroupHeaderItem.
public string HeaderText { get; set; }
string, copied from the column's HeaderText if this group expression is based on a column. It defaults to the FieldAlias value (if specified).
Meaningful only for fields in the SelectFields collection. When rendering RadGrid will override the FieldAlias value with the HeaderText specified.
Gets boolean value indicating whether the current GridGroupByField is an aggregate.
[Browsable(false)]
public virtual bool IsAggregate { get; }
Gets boolean value indicating whether FieldAlias is set. When false, FieldAlias will return 'Aggregate of FieldName' if the current group-by field is an aggregate, 'FieldName' otherwise.
[Browsable(false)]
public virtual bool IsFieldAliasSet { get; }
Gets a value indicating whether the FormatString is set.
[Browsable(false)]
public virtual bool IsFormatStringSet { get; }
Gets boolean value indicating whether HeaderText is set. When false, HeaderText will return FieldAlias
[Browsable(false)]
public bool IsHeaderTextSet { get; }
Gets or sets an object to be set as the control property when the data source contains a DBNull value.
[Browsable(false)]
public virtual object NullValue { get; set; }
Gets or sets the value indicating how the data will be sorted. Acceptable values are the values of RadSortOrder enumeration (Ascending, Descending and None).
[Browsable(true)]
public virtual RadSortOrder SortOrder { get; set; }
Returns the sorting mode applied to the grouped data. By default it is Ascending.
Meaningful only for fields in the GroupByFields collection.
Methods
Inherited but not used
Method which gets the HeaderText value from GridGroupByField part of the SelectFields collection
public string GetHeaderText()
String containing the HeaderText value
Meaningful only for GridGroupByFields from the SelectFields collection
Each GridGroupByField can be referenced using FieldName and FieldAlias
This method checks whether the current GridGroupByField's FieldName or FieldAlias
match the given name
protected void ResetFieldAliasCache()
Method setting the aggregate function applied for a GridGroupByField which is part of the SelectFields collection.
public virtual void SetAggregate(string value)
Meaningful only for GridGroupByFields from the SelectFields collection
Method setting the sort order applied for a GridGroupByField which is part of the GroupByFields collection.
public void SetSortOrder(string SortOrder)
Meaningful only for GridGroupByFields from the GroupByFields collection
Method that retrieves a System.String that indicates the current object
Inherited but not used
public virtual void Validate()