Class GridViewBoundColumnBase
This class inherits from GridViewColumn and add some specific to Data properties such as DataType, DataFormatString.
Inherited Members
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.GridView.dll
Syntax
public class GridViewBoundColumnBase : GridViewColumn, IFilterableColumn, INotifyPropertyChanged, IColumnElement, IDataFieldDescriptor, IFieldDescriptor, IExportableColumn
Constructors
GridViewBoundColumnBase()
Declaration
public GridViewBoundColumnBase()
Fields
DataFormatStringProperty
Identifies the DataFormatString dependency property.
Declaration
public static readonly DependencyProperty DataFormatStringProperty
Field Value
System.Windows.DependencyProperty
|
DataTypeProperty
Identifies the DataType dependency property.
Declaration
public static readonly DependencyProperty DataTypeProperty
Field Value
System.Windows.DependencyProperty
|
EditorStyleProperty
Identifies the EditorStyle dependency property.
Declaration
public static readonly DependencyProperty EditorStyleProperty
Field Value
System.Windows.DependencyProperty
|
ValidatesOnDataErrorsProperty
Identifies the ValidatesOnDataErrors dependency property.
Declaration
public static readonly DependencyProperty ValidatesOnDataErrorsProperty
Field Value
System.Windows.DependencyProperty
|
Properties
BindingTarget
Gets or sets the Dependency property of the editor element of the GridViewBoundColumnBase which actually is used for Binding to data source property.
Declaration
protected DependencyProperty BindingTarget { get; set; }
Property Value
System.Windows.DependencyProperty
The binding target. |
DataFormatString
Gets or sets the data format string. Used with string.Format statement. This is a dependency property.
Declaration
public string DataFormatString { get; set; }
Property Value
System.String
The data format string. |
Implements
DataMemberBinding
Gets or sets the binding which points to the data member to display in the cells of the GridViewBoundColumnBase.
Declaration
public virtual Binding DataMemberBinding { get; set; }
Property Value
System.Windows.Data.Binding
The display member binding. |
Implements
DataType
Gets or sets the data type of the column. This usually reflects the type of the member that this column is bound to. This is a dependency property.
Declaration
public virtual Type DataType { get; set; }
Property Value
System.Type
The type for this bound column. |
Implements
EditorStyle
Gets or sets the style which will be applied on the editor.
Declaration
public Style EditorStyle { get; set; }
Property Value
System.Windows.Style
The editor style. |
ExportedElementWidth
Gets the actual width of the column.
Declaration
public double ExportedElementWidth { get; }
Property Value
System.Double
|
Implements
FilteringDisplayFunc
Gets the filtering display function.
Declaration
protected override Func<object, object> FilteringDisplayFunc { get; }
Property Value
System.Func<System.Object, System.Object>
The filtering display function. |
Overrides
Remarks
This function is used by the filtering control distinct values list. It accepts a raw data value and returns what will become the content of the distinct value checkbox.
Header
Gets or sets the content of the column header.
Declaration
public override object Header { get; set; }
Property Value
System.Object
|
Overrides
Remarks
The ElementName binding does not work when used in column Header or CellTemplate. The problem comes from the fact that binding engine uses FindName method on FrameworkElement to find the target just once. So when element is loaded with LoadContent() – the element is not yet in the visual tree and FindName fails. As a solution, you can apply a Style to set the ContentTemplate.
IsReadOnlyBinding
Property that allows you to set individual columns into a readonly state using Binding.
Declaration
public Binding IsReadOnlyBinding { get; set; }
Property Value
System.Windows.Data.Binding
|
ValidatesOnDataErrors
Denotes in which mode GridViewBoundColumnBase will perform data validation.
Declaration
public GridViewValidationMode ValidatesOnDataErrors { get; set; }
Property Value
GridViewValidationMode
The default value is a combination between all modes (InViewMode and InEditMode). |
Methods
CanEdit(Object)
Determines whether the data represented by the column can be edited.
Declaration
public override bool CanEdit(object item)
Parameters
System.Object
item
|
Returns
System.Boolean
|
Overrides
CanFilter()
Determines whether the data represented by the column can be filtered by the RadGridView control.
Declaration
public override bool CanFilter()
Returns
System.Boolean
|
Overrides
CanGroup()
Determines whether the data represented by the column can be grouped.
Declaration
public override bool CanGroup()
Returns
System.Boolean
|
Overrides
Implements
CanSort()
Determines whether the data represented by the column can be sorted.
Declaration
public override bool CanSort()
Returns
System.Boolean
|
Overrides
Implements
CopyPropertiesFrom(GridViewColumn)
Copy properties from source column.
Declaration
public override void CopyPropertiesFrom(GridViewColumn source)
Parameters
GridViewColumn
source
|
Overrides
CreateCellElement(GridViewCell, Object)
Creates the element for the cell in view mode.
Declaration
public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
Parameters
GridViewCell
cell
|
System.Object
dataItem
|
Returns
System.Windows.FrameworkElement
|
Overrides
GetCellContent(Object)
Gets the content of a cell that is associated with this column.
Declaration
protected virtual object GetCellContent(object item)
Parameters
System.Object
item
The data item. |
Returns
System.Object
Cell content. |
GetDisplayCellContent(Object)
Generates the cell content of GridViewBoundColumnBase.
Declaration
protected virtual object GetDisplayCellContent(object item)
Parameters
System.Object
item
|
Returns
System.Object
|
GetExportCellContent(Object)
Generates the exported cell content of IExportableColumn.
Declaration
protected virtual object GetExportCellContent(object item)
Parameters
System.Object
item
|
Returns
System.Object
|
GetNewValueFromEditor(Object)
Gets the new value from the editor. Used from the validation mechanism to get the new value before this value to be committed to the data source.
Declaration
public virtual object GetNewValueFromEditor(object editor)
Parameters
System.Object
editor
The editor. |
Returns
System.Object
|
GetValueForItem(Object)
Gets the value associated with this column for provided data item.
Declaration
public object GetValueForItem(object item)
Parameters
System.Object
item
The data item. |
Returns
System.Object
|
OnAggregateFunctionsCollectionChanged(NotifyCollectionChangedEventArgs)
Called when the aggregate functions collection has changed.
Declaration
protected override void OnAggregateFunctionsCollectionChanged(NotifyCollectionChangedEventArgs e)
Parameters
System.Collections.Specialized.NotifyCollectionChangedEventArgs
e
The System.Collections.Specialized.NotifyCollectionChangedEventArgs instance containing the event data. |
Overrides
OnCopyingCellClipboardContent(Object)
This method is called for each selected cell to retrieve the default cell content.
Declaration
public override object OnCopyingCellClipboardContent(object item)
Parameters
System.Object
item
The data context for the selected element. |
Returns
System.Object
An object that represents the content of the cell. |
Overrides
OnDataMemberBindingChanged()
Called when DataMemberBinding was changed.
Declaration
protected virtual void OnDataMemberBindingChanged()
OnPastingCellClipboardContent(Object, Object)
This method is called for each selected cell to replace the cell content with data from the clipboard.
Declaration
public override void OnPastingCellClipboardContent(object item, object value)
Parameters
System.Object
item
The data context for the selected element. |
System.Object
value
The clipboard data for the selected cell. |
Overrides
PrepareCellForEdit(FrameworkElement, RoutedEventArgs)
Prepares GridViewCell for edit.
Declaration
protected override object PrepareCellForEdit(FrameworkElement editingElement, RoutedEventArgs editingEventArgs)
Parameters
System.Windows.FrameworkElement
editingElement
The editing element. |
System.Windows.RoutedEventArgs
editingEventArgs
The System.Windows.RoutedEventArgs instance containing the event data. |
Returns
System.Object
|
Overrides
RefreshCellElement(FrameworkElement, DependencyProperty)
Called when cell element needs refresh.
Declaration
protected override void RefreshCellElement(FrameworkElement element, DependencyProperty dependencyProperty)
Parameters
System.Windows.FrameworkElement
element
|
System.Windows.DependencyProperty
dependencyProperty
|
Overrides
UpdateSourceWithEditorValue(GridViewCell)
Updates the source with editor value.
Declaration
public virtual IList<string> UpdateSourceWithEditorValue(GridViewCell gridViewCell)
Parameters
GridViewCell
gridViewCell
The GridViewCell instance which contains the editor. |
Returns
System.Collections.Generic.IList<System.String>
|
Explicit Interface Implementations
IExportableColumn.GetCellContent(Object)
Declaration
object IExportableColumn.GetCellContent(object parameter)
Parameters
System.Object
parameter
|
Returns
System.Object
|