Class
GridViewBoundColumnBase

This class inherits from GridViewColumn and add some specific to Data properties such as DataType, DataFormatString.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.GridView.dll

Syntax:

cs-api-definition
public class GridViewBoundColumnBase : GridViewColumn, INotifyPropertyChanged, IDataFieldDescriptor, IFieldDescriptor, IExportableColumn

Inheritance: objectGridViewColumnGridViewBoundColumnBase

Derived Classes: GridViewCheckBoxColumnGridViewComboBoxColumnGridViewDataColumnGridViewDynamicHyperlinkColumnGridViewHyperlinkColumnGridViewImageColumnGridViewMaskedInputColumnGridViewMultiColumnComboBoxColumn

Implements: IDataFieldDescriptorIExportableColumnIFieldDescriptorINotifyPropertyChanged

Inherited Members GridViewColumn.IsFilterablePropertyGridViewColumn.ShowDistinctFiltersPropertyGridViewColumn.ShowFieldFiltersPropertyGridViewColumn.ShouldGenerateFieldFilterEditorsPropertyGridViewColumn.ShowFilterButtonPropertyGridViewColumn.FilteringControlStylePropertyGridViewColumn.IsFilteringDeferredPropertyGridViewColumn.FilterMemberTypePropertyGridViewColumn.OptimizeDistinctFilterQueryPropertyGridViewColumn.DistinctValuesDisplayModePropertyGridViewColumn.DistinctValuesSearchModePropertyGridViewColumn.EnableDistinctValuesFilteringPropertyGridViewColumn.WidthPropertyGridViewColumn.MinWidthPropertyGridViewColumn.MaxWidthPropertyGridViewColumn.TabStopModePropertyGridViewColumn.FooterCellStylePropertyGridViewColumn.GroupFooterCellStylePropertyGridViewColumn.HeaderCellStylePropertyGridViewColumn.EditTriggersPropertyGridViewColumn.IsFrozenPropertyGridViewColumn.CellStylePropertyGridViewColumn.CellTemplateSelectorPropertyGridViewColumn.CellEditTemplateSelectorPropertyGridViewColumn.CellEditTemplatePropertyGridViewColumn.CellTemplatePropertyGridViewColumn.ToolTipTemplatePropertyGridViewColumn.ToolTipTemplateSelectorPropertyGridViewColumn.ShowToolTipOnTrimmedTextPropertyGridViewColumn.ToolTipShowDurationPropertyGridViewColumn.GroupFooterTemplateSelectorPropertyGridViewColumn.GroupFooterTemplatePropertyGridViewColumn.GroupHeaderTemplateSelectorPropertyGridViewColumn.GroupHeaderTemplatePropertyGridViewColumn.SortingStatePropertyGridViewColumn.IsSortablePropertyGridViewColumn.IsResizablePropertyGridViewColumn.IsGroupablePropertyGridViewColumn.IsReorderablePropertyGridViewColumn.SortingStateChangedEventGridViewColumn.IsReadOnlyPropertyGridViewColumn.TextAlignmentPropertyGridViewColumn.HeaderTextAlignmentPropertyGridViewColumn.TextWrappingPropertyGridViewColumn.HeaderTextWrappingPropertyGridViewColumn.FooterPropertyGridViewColumn.HeaderPropertyGridViewColumn.TextDecorationsPropertyGridViewColumn.HeaderTextDecorationsPropertyGridViewColumn.IsCustomSortingEnabledPropertyGridViewColumn.CellStyleSelectorPropertyGridViewColumn.GroupFooterCellStyleSelectorPropertyGridViewColumn.FooterTextAlignmentPropertyGridViewColumn.TextTrimmingPropertyGridViewColumn.HeaderTextTrimmingPropertyGridViewColumn.BackgroundPropertyGridViewColumn.IsVisiblePropertyGridViewColumn.DisplayIndexPropertyGridViewColumn.ShowColumnWhenGroupedPropertyGridViewColumn.SortingIndexPropertyGridViewColumn.IsSelectedPropertyGridViewColumn.CreateFieldFilterEditor()GridViewColumn.CreateColumnFilterDescriptor()GridViewColumn.ClearFilters()GridViewColumn.GetFilteringDisplayString(object)GridViewColumn.SortDistinctValues(IQueryable)GridViewColumn.SortDistinctValuesByFilteringDisplay(IQueryable)GridViewColumn.OnPropertyChanged(PropertyChangedEventArgs)GridViewColumn.OnPropertyChanged(string)GridViewColumn.Refresh()GridViewColumn.CreateCellEditElement(GridViewCell, object)GridViewColumn.GetAggregateResults(QueryableCollectionViewGroup)GridViewColumn.OnAggregateFunctionsItemChanged(ItemChangedEventArgs<AggregateFunction>)GridViewColumn.GetGridViewColumn(IFieldDescriptor)GridViewColumn.OnInitialized(EventArgs)GridViewColumn.CreateField()GridViewColumn.IsFilterableGridViewColumn.ShowDistinctFiltersGridViewColumn.ShowFieldFiltersGridViewColumn.ShouldGenerateFieldFilterEditorsGridViewColumn.ShowFilterButtonGridViewColumn.FilteringControlStyleGridViewColumn.DistinctValuesDisplayModeGridViewColumn.DistinctValuesSearchModeGridViewColumn.EnableDistinctValuesFilteringGridViewColumn.FilteringControlGridViewColumn.ColumnFilterDescriptorGridViewColumn.IsFilteringDeferredGridViewColumn.FilterMemberPathGridViewColumn.FilterMemberTypeGridViewColumn.OptimizeDistinctFilterQueryGridViewColumn.TargetFiltersGridViewColumn.WidthGridViewColumn.MinWidthGridViewColumn.MaxWidthGridViewColumn.ActualWidthGridViewColumn.IsAutoGeneratedGridViewColumn.TabStopModeGridViewColumn.EditTriggersGridViewColumn.CellTemplateSelectorGridViewColumn.CellEditTemplateSelectorGridViewColumn.CellEditTemplateGridViewColumn.CellTemplateGridViewColumn.ToolTipTemplateGridViewColumn.ToolTipTemplateSelectorGridViewColumn.ShowToolTipOnTrimmedTextGridViewColumn.ToolTipShowDurationGridViewColumn.GroupFooterTemplateSelectorGridViewColumn.GroupFooterTemplateGridViewColumn.GroupHeaderTemplateSelectorGridViewColumn.GroupHeaderTemplateGridViewColumn.AggregateFunctionsGridViewColumn.IsReorderableGridViewColumn.IsFrozenGridViewColumn.IsRightSideFrozenGridViewColumn.IsLeftSideFrozenGridViewColumn.TextDecorationsGridViewColumn.HeaderTextDecorationsGridViewColumn.SortingStateGridViewColumn.IsGroupableGridViewColumn.CellStyleGridViewColumn.CellStyleSelectorGridViewColumn.IsResizableGridViewColumn.IsSortableGridViewColumn.HeaderCellStyleGridViewColumn.FooterCellStyleGridViewColumn.GroupFooterCellStyleGridViewColumn.GroupFooterCellStyleSelectorGridViewColumn.TextAlignmentGridViewColumn.HeaderTextAlignmentGridViewColumn.FooterTextAlignmentGridViewColumn.TextWrappingGridViewColumn.HeaderTextWrappingGridViewColumn.TextTrimmingGridViewColumn.HeaderTextTrimmingGridViewColumn.IsCustomSortingEnabledGridViewColumn.BackgroundGridViewColumn.IsVisibleGridViewColumn.UniqueNameGridViewColumn.SortMemberPathGridViewColumn.GroupMemberPathGridViewColumn.FooterGridViewColumn.IsReadOnlyGridViewColumn.DataControlGridViewColumn.DisplayIndexGridViewColumn.GroupHeaderFormatStringGridViewColumn.ColumnGroupNameGridViewColumn.ItemTypeGridViewColumn.ShowColumnWhenGroupedGridViewColumn.SortingIndexGridViewColumn.IsSelectedGridViewColumn.PropertyChangedGridViewColumn.SortingStateChanged

Constructors

GridViewBoundColumnBase()

Declaration

cs-api-definition
public GridViewBoundColumnBase()

Fields

DataFormatStringProperty

Identifies the DataFormatString dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DataFormatStringProperty

Field Value

DependencyProperty

DataTypeProperty

Identifies the DataType dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DataTypeProperty

Field Value

DependencyProperty

EditorStyleProperty

Identifies the EditorStyle dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty EditorStyleProperty

Field Value

DependencyProperty

IsSearchableProperty

Identifies the IsSearchable dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty IsSearchableProperty

Field Value

DependencyProperty

ValidatesOnDataErrorsProperty

Identifies the ValidatesOnDataErrors dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ValidatesOnDataErrorsProperty

Field Value

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

cs-api-definition
protected DependencyProperty BindingTarget { get; set; }

Property Value

DependencyProperty

The binding target.

DataFormatString

Gets or sets the data format string. Used with string.Format statement. This is a dependency property.

Declaration

cs-api-definition
public string DataFormatString { get; set; }

Property Value

string

The data format string.

Implements IDataFieldDescriptor.DataFormatStringIExportableColumn.DataFormatString

DataMemberBinding

Gets or sets the binding which points to the data member to display in the cells of the GridViewBoundColumnBase.

Declaration

cs-api-definition
public virtual Binding DataMemberBinding { get; set; }

Property Value

Binding

The display member binding.

Implements IDataFieldDescriptor.DataMemberBinding

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

cs-api-definition
public virtual Type DataType { get; set; }

Property Value

Type

The type for this bound column.

Implements IDataFieldDescriptor.DataType

EditorStyle

Gets or sets the style which will be applied on the editor.

Declaration

cs-api-definition
public Style EditorStyle { get; set; }

Property Value

Style

The editor style.

ExportedElementWidth

Gets the actual width of the column.

Declaration

cs-api-definition
public double ExportedElementWidth { get; }

Property Value

double

Implements IExportableColumn.ExportedElementWidth

FilteringDisplayFunc

Gets the filtering display function.

Declaration

cs-api-definition
protected override Func<object, object> FilteringDisplayFunc { get; }

Property Value

Func<object, object>

The filtering display function.

Overrides GridViewColumn.FilteringDisplayFunc

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

cs-api-definition
public override object Header { get; set; }

Property Value

object

Overrides GridViewColumn.Header

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

cs-api-definition
public Binding IsReadOnlyBinding { get; set; }

Property Value

Binding

IsSearchable

Gets or sets a value indicating whether this column will be included in Search as You Type functionality of RadGridView.

Declaration

cs-api-definition
public bool IsSearchable { get; set; }

Property Value

bool

true if in this column can be searched; otherwise, false.

SearchPanel

Gets the corresponding searchPanel.

Declaration

cs-api-definition
public GridViewSearchPanel SearchPanel { get; }

Property Value

GridViewSearchPanel

ValidatesOnDataErrors

Denotes in which mode GridViewBoundColumnBase will perform data validation.

Declaration

cs-api-definition
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

cs-api-definition
public override bool CanEdit(object item)

Parameters

item

object

Returns

bool

true if the data represented by the column can be edited; otherwise, false.

Overrides GridViewColumn.CanEdit(object)

CanFilter()

Determines whether the data represented by the column can be filtered by the RadGridView control.

Declaration

cs-api-definition
public override bool CanFilter()

Returns

bool

true if the data represented by the column can be filtered automatically; otherwise, false.

Overrides GridViewColumn.CanFilter()

CanGroup()

Determines whether the data represented by the column can be grouped.

Declaration

cs-api-definition
public override bool CanGroup()

Returns

bool

true if the data represented by the column can be grouped; otherwise, false.

Overrides GridViewColumn.CanGroup()

Implements IDataFieldDescriptor.CanGroup()

CanSort()

Determines whether the data represented by the column can be sorted.

Declaration

cs-api-definition
public override bool CanSort()

Returns

bool

true if the data represented by the column can be sorted; otherwise, false.

Overrides GridViewColumn.CanSort()

Implements IDataFieldDescriptor.CanSort()

CopyPropertiesFrom(GridViewColumn)

Copy properties from source column.

Declaration

cs-api-definition
public override void CopyPropertiesFrom(GridViewColumn source)

Parameters

source

GridViewColumn

Overrides GridViewColumn.CopyPropertiesFrom(GridViewColumn)

CreateCellElement(GridViewCell, object)

Creates the element for the cell in view mode.

Declaration

cs-api-definition
public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)

Parameters

cell

GridViewCell

dataItem

object

Returns

FrameworkElement

Overrides GridViewColumn.CreateCellElement(GridViewCell, object)

GetCellContent(object)

Gets the content of a cell that is associated with this column.

Declaration

cs-api-definition
protected virtual object GetCellContent(object item)

Parameters

item

object

The data item.

Returns

object

Cell content.

GetDisplayCellContent(object)

Generates the cell content of GridViewBoundColumnBase.

Declaration

cs-api-definition
protected virtual object GetDisplayCellContent(object item)

Parameters

item

object

Returns

object

GetExportCellContent(object)

Generates the exported cell content of IExportableColumn.

Declaration

cs-api-definition
protected virtual object GetExportCellContent(object item)

Parameters

item

object

Returns

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

cs-api-definition
public virtual object GetNewValueFromEditor(object editor)

Parameters

editor

object

The editor.

Returns

object

GetValueForItem(object)

Gets the value associated with this column for provided data item.

Declaration

cs-api-definition
public object GetValueForItem(object item)

Parameters

item

object

The data item.

Returns

object

OnAggregateFunctionsCollectionChanged(NotifyCollectionChangedEventArgs)

Called when the aggregate functions collection has changed.

Declaration

cs-api-definition
protected override void OnAggregateFunctionsCollectionChanged(NotifyCollectionChangedEventArgs e)

Parameters

e

NotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Overrides GridViewColumn.OnAggregateFunctionsCollectionChanged(NotifyCollectionChangedEventArgs)

OnCopyingCellClipboardContent(object)

This method is called for each selected cell to retrieve the default cell content.

Declaration

cs-api-definition
public override object OnCopyingCellClipboardContent(object item)

Parameters

item

object

The data context for the selected element.

Returns

object

An object that represents the content of the cell.

Overrides GridViewColumn.OnCopyingCellClipboardContent(object)

OnDataMemberBindingChanged()

Called when DataMemberBinding was changed.

Declaration

cs-api-definition
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

cs-api-definition
public override void OnPastingCellClipboardContent(object item, object value)

Parameters

item

object

The data context for the selected element.

value

object

The clipboard data for the selected cell.

Overrides GridViewColumn.OnPastingCellClipboardContent(object, object)

PrepareCellForEdit(FrameworkElement, RoutedEventArgs)

Prepares GridViewCell for edit.

Declaration

cs-api-definition
protected override object PrepareCellForEdit(FrameworkElement editingElement, RoutedEventArgs editingEventArgs)

Parameters

editingElement

FrameworkElement

The editing element.

editingEventArgs

RoutedEventArgs

The RoutedEventArgs instance containing the event data.

Returns

object

Overrides GridViewColumn.PrepareCellForEdit(FrameworkElement, RoutedEventArgs)

RefreshCellElement(FrameworkElement, DependencyProperty)

Called when cell element needs refresh.

Declaration

cs-api-definition
protected override void RefreshCellElement(FrameworkElement element, DependencyProperty dependencyProperty)

Parameters

element

FrameworkElement

dependencyProperty

DependencyProperty

Overrides GridViewColumn.RefreshCellElement(FrameworkElement, DependencyProperty)

UpdateSourceWithEditorValue(GridViewCell)

Updates the source with editor value.

Declaration

cs-api-definition
public virtual IList<string> UpdateSourceWithEditorValue(GridViewCell gridViewCell)

Parameters

gridViewCell

GridViewCell

The GridViewCell instance which contains the editor.

Returns

IList<string>