GridCheckBoxColumn
Displays a CheckBox control for each item in the column. This allows you to edit for example Boolean field(s) from data table(s).
This column is editable (implements the IGridEditableColumn interface) and provides by default GridBoolColumnEditor, used for editing the text in each item. You can persist the checked state of a checkbox, if you use it within GridTemplateColumn ( see here).
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
public class GridCheckBoxColumn : GridEditableColumn, IStateManager, IComparable, IGridEditableColumn, IGridDataColumn
Inheritance: objectGridColumnGridEditableColumnGridCheckBoxColumn
Implements:
Inherited Members
Example:
<radG:GridCheckBoxColumn FooterText="CheckBoxColumn footer" UniqueName="Bool" HeaderText="CheckBox<br/>Column"
DataField="Bool">
</radG:GridCheckBoxColumn>
Constructors
public GridCheckBoxColumn()
Properties
Gets or sets the field name from the specified data source to bind to the column.
public string DataField { get; set; }
A string, specifying the data field from the data source, from which to bind the column.
Gets a boolean value, indicating whether the column is editable. A ReadOnly column will return a false value for this property. The property is readOnly.
public override bool IsEditable { get; }
A boolean value, indicating whether the column is editable.
Overrides:
Should override if sorting will be disabled
protected override bool Sortable { get; }
Overrides:
Use this property when binding to string column that contains boolean values written as string. For example if the values in your column are "Yes" and "No", set StringTrueValue="Yes" and StringFalseValue="No"
public virtual string StringFalseValue { get; set; }
Use this property when binding to string column that contains boolean values written as string. For example if the values in your column are "Yes" and "No", set StringTrueValue="Yes" and StringFalseValue="No"
public virtual string StringTrueValue { get; set; }
Methods
Creates a copy of the current column.
public override GridColumn Clone()
Overrides:
Note: When implementing/overriding this method be sure to call the base member or call CopyBaseProperties to be sure that all base properties will be copied accordingly
protected override void ColumnEditorChange(IGridColumnEditor newValue)
Overrides:
protected override void CopyBaseProperties(GridColumn fromColumn)
Overrides:
protected override IGridColumnEditor CreateDefaultColumnEditor()
Overrides:
Gets a string representing a filter expression, based on the settings of all columns that support filtering, with a syntax ready to be used by a DataView object
public override string EvaluateFilterExpression(GridFilteringItem filteringItem)
Overrides:
Extracts the values from the editedItem and fills the names/values pairs for each data-field edited by the column in the newValues dictionary.
public override void FillValues(IDictionary newValues, GridEditableItem editableItem)
dictionary to fill. This param should not be null (Nothing in VB.NET)
editableItemGridEditableItemthe GridEditableItem to extract values from
Overrides:
This method should be used in case you develop your own column. It returns the full list of DataFields used by the column. GridTableView uses this to decide which DataFields from the specified DataSource will be inlcuded in case of GridTableView.RetrieveAllDataFields is set to false.
public override IDictionary GetCustomPropertyDataFields(object dataItemInstance)
Overrides:
Calculate the default Group-by expression based on the settings of the DataField (if available)
public override string GetDefaultGroupByExpression()
Overrides:
For example, if a column's DataField is ProductType the default group-by expression will be: 'ProductType Group By ProductType'
This method should be used in case you develop your own column. It returns true if the column supports filtering.