New to Telerik UI for WPFStart a free 30-day trial

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:

C#
public class GridViewBoundColumnBase : GridViewColumn, INotifyPropertyChanged, IDataFieldDescriptor, IFieldDescriptor, IExportableColumn

Inheritance: objectGridViewColumnGridViewBoundColumnBase

Derived Classes: GridViewCheckBoxColumnGridViewComboBoxColumnGridViewDataColumnGridViewDynamicHyperlinkColumnGridViewHyperlinkColumnGridViewImageColumnGridViewMaskedInputColumnGridViewMultiColumnComboBoxColumn...

Implements: IDataFieldDescriptorIExportableColumnIFieldDescriptorINotifyPropertyChanged

Inherited Members GridViewColumn.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.IsFilterablePropertyGridViewColumn.ShowDistinctFiltersPropertyGridViewColumn.ShowFieldFiltersPropertyGridViewColumn.ShouldGenerateFieldFilterEditorsPropertyGridViewColumn.ShowFilterButtonPropertyGridViewColumn.FilteringControlStylePropertyGridViewColumn.IsFilteringDeferredPropertyGridViewColumn.FilterMemberTypePropertyGridViewColumn.OptimizeDistinctFilterQueryPropertyGridViewColumn.DistinctValuesDisplayModePropertyGridViewColumn.DistinctValuesSearchModePropertyGridViewColumn.EnableDistinctValuesFilteringPropertyGridViewColumn.WidthPropertyGridViewColumn.MinWidthPropertyGridViewColumn.MaxWidthPropertyGridViewColumn.Refresh()GridViewColumn.CreateCellEditElement(GridViewCell, object)GridViewColumn.GetAggregateResults(QueryableCollectionViewGroup)GridViewColumn.OnAggregateFunctionsItemChanged(ItemChangedEventArgs<AggregateFunction>)GridViewColumn.GetGridViewColumn(IFieldDescriptor)GridViewColumn.OnInitialized(EventArgs)GridViewColumn.CreateField()GridViewColumn.CreateFieldFilterEditor()GridViewColumn.CreateColumnFilterDescriptor()GridViewColumn.ClearFilters()GridViewColumn.GetFilteringDisplayString(object)GridViewColumn.SortDistinctValues(IQueryable)GridViewColumn.SortDistinctValuesByFilteringDisplay(IQueryable)GridViewColumn.OnPropertyChanged(PropertyChangedEventArgs)GridViewColumn.OnPropertyChanged(string)GridViewColumn.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.IsFilterableGridViewColumn.ShowDistinctFiltersGridViewColumn.ShowFieldFiltersGridViewColumn.ShouldGenerateFieldFilterEditorsGridViewColumn.ShowFilterButtonGridViewColumn.FilteringControlStyleGridViewColumn.DistinctValuesDisplayModeGridViewColumn.DistinctValuesSearchModeGridViewColumn.EnableDistinctValuesFilteringGridViewColumn.FilteringControlGridViewColumn.ColumnFilterDescriptorGridViewColumn.IsFilteringDeferredGridViewColumn.FilterMemberPathGridViewColumn.FilterMemberTypeGridViewColumn.OptimizeDistinctFilterQueryGridViewColumn.TargetFiltersGridViewColumn.WidthGridViewColumn.MinWidthGridViewColumn.MaxWidthGridViewColumn.ActualWidthGridViewColumn.SortingStateChangedGridViewColumn.PropertyChanged...

Constructors

C#
public GridViewBoundColumnBase()

Fields

DataFormatStringProperty

DependencyProperty

Identifies the DataFormatString dependency property.

C#
public static readonly DependencyProperty DataFormatStringProperty

DataTypeProperty

DependencyProperty

Identifies the DataType dependency property.

C#
public static readonly DependencyProperty DataTypeProperty

EditorStyleProperty

DependencyProperty

Identifies the EditorStyle dependency property.

C#
public static readonly DependencyProperty EditorStyleProperty

IsSearchableProperty

DependencyProperty

Identifies the IsSearchable dependency property.

C#
public static readonly DependencyProperty IsSearchableProperty

Identifies the ValidatesOnDataErrors dependency property.

C#
public static readonly DependencyProperty ValidatesOnDataErrorsProperty

Properties

BindingTarget

DependencyProperty

Gets or sets the Dependency property of the editor element of the GridViewBoundColumnBase which actually is used for Binding to data source property.

C#
protected DependencyProperty BindingTarget { get; set; }
Property Value:

The binding target.

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

C#
public string DataFormatString { get; set; }
Property Value:

The data format string.

Implements: IDataFieldDescriptor.DataFormatStringIExportableColumn.DataFormatString

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

C#
public virtual Binding DataMemberBinding { get; set; }
Property Value:

The display member binding.

Implements: IDataFieldDescriptor.DataMemberBinding

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.

C#
public virtual Type DataType { get; set; }
Property Value:

The type for this bound column.

Implements: IDataFieldDescriptor.DataType

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

C#
public Style EditorStyle { get; set; }
Property Value:

The editor style.

Gets the actual width of the column.

C#
public double ExportedElementWidth { get; }

Implements: IExportableColumn.ExportedElementWidth

Gets the filtering display function.

C#
protected override Func<object, object> FilteringDisplayFunc { get; }
Property Value:

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.

Gets or sets the content of the column header.

C#
public override object Header { get; set; }

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.

Property that allows you to set individual columns into a readonly state using Binding.

C#
public Binding IsReadOnlyBinding { get; set; }

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

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

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

Gets the corresponding searchPanel.

C#
public GridViewSearchPanel SearchPanel { get; }

Denotes in which mode GridViewBoundColumnBase will perform data validation.

C#
public GridViewValidationMode ValidatesOnDataErrors { get; set; }
Property Value:

The default value is a combination between all modes (InViewMode and InEditMode).

Methods

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

C#
public override bool CanEdit(object item)
Parameters:itemobjectReturns:

bool

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

Overrides: GridViewColumn.CanEdit(object)

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

C#
public override bool CanFilter()
Returns:

bool

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

Overrides: GridViewColumn.CanFilter()

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

C#
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()

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

C#
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()

Copy properties from source column.

C#
public override void CopyPropertiesFrom(GridViewColumn source)
Parameters:sourceGridViewColumn

Overrides: GridViewColumn.CopyPropertiesFrom(GridViewColumn)

Creates the element for the cell in view mode.

C#
public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
Parameters:cellGridViewCelldataItemobjectReturns:

FrameworkElement

Overrides: GridViewColumn.CreateCellElement(GridViewCell, object)

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

C#
protected virtual object GetCellContent(object item)
Parameters:itemobject

The data item.

Returns:

object

Cell content.

Generates the cell content of GridViewBoundColumnBase.

C#
protected virtual object GetDisplayCellContent(object item)
Parameters:itemobjectReturns:

object

Generates the exported cell content of IExportableColumn.

C#
protected virtual object GetExportCellContent(object item)
Parameters:itemobjectReturns:

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.

C#
public virtual object GetNewValueFromEditor(object editor)
Parameters:editorobject

The editor.

Returns:

object

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

C#
public object GetValueForItem(object item)
Parameters:itemobject

The data item.

Returns:

object

Called when the aggregate functions collection has changed.

C#
protected override void OnAggregateFunctionsCollectionChanged(NotifyCollectionChangedEventArgs e)
Parameters:eNotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Overrides: GridViewColumn.OnAggregateFunctionsCollectionChanged(NotifyCollectionChangedEventArgs)

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

C#
public override object OnCopyingCellClipboardContent(object item)
Parameters:itemobject

The data context for the selected element.

Returns:

object

An object that represents the content of the cell.

Overrides: GridViewColumn.OnCopyingCellClipboardContent(object)

Called when DataMemberBinding was changed.

C#
protected virtual void OnDataMemberBindingChanged()

This method is called for each selected cell to replace the cell content with data from the clipboard.

C#
public override void OnPastingCellClipboardContent(object item, object value)
Parameters:itemobject

The data context for the selected element.

valueobject

The clipboard data for the selected cell.

Overrides: GridViewColumn.OnPastingCellClipboardContent(object, object)

Prepares GridViewCell for edit.

C#
protected override object PrepareCellForEdit(FrameworkElement editingElement, RoutedEventArgs editingEventArgs)
Parameters:editingElementFrameworkElement

The editing element.

editingEventArgsRoutedEventArgs

The RoutedEventArgs instance containing the event data.

Returns:

object

Overrides: GridViewColumn.PrepareCellForEdit(FrameworkElement, RoutedEventArgs)

Called when cell element needs refresh.

C#
protected override void RefreshCellElement(FrameworkElement element, DependencyProperty dependencyProperty)
Parameters:elementFrameworkElementdependencyPropertyDependencyProperty

Overrides: GridViewColumn.RefreshCellElement(FrameworkElement, DependencyProperty)

Updates the source with editor value.

C#
public virtual IList<string> UpdateSourceWithEditorValue(GridViewCell gridViewCell)
Parameters:gridViewCellGridViewCell

The GridViewCell instance which contains the editor.

Returns:

IList<string>