Class GridViewComboBoxColumn
GridViewComboBoxColumn provides an easy and fast way to display and edit lookup data. The key properties to set are : valueMemberPath, DisplayMemberPath and ItemsSource.
Inherited Members
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.GridView.dll
Syntax
public class GridViewComboBoxColumn : GridViewBoundColumnBase, IFilterableColumn, INotifyPropertyChanged, IColumnElement, IDataFieldDescriptor, IFieldDescriptor, IExportableColumn
Constructors
GridViewComboBoxColumn()
Declaration
public GridViewComboBoxColumn()
Fields
DisplayMemberPathProperty
Represents the DisplayMemberPath dependency property.
Declaration
public static readonly DependencyProperty DisplayMemberPathProperty
Field Value
System.Windows.DependencyProperty
|
EmptyTextProperty
Represents the EmptyText dependency property.
Declaration
public static readonly DependencyProperty EmptyTextProperty
Field Value
System.Windows.DependencyProperty
|
IsComboBoxEditableProperty
Represents the IsComboBoxEditable dependency property.
Declaration
public static readonly DependencyProperty IsComboBoxEditableProperty
Field Value
System.Windows.DependencyProperty
|
IsLightweightModeEnabledProperty
Represents the IsLightweightModeEnabled dependency property.
Declaration
public static readonly DependencyProperty IsLightweightModeEnabledProperty
Field Value
System.Windows.DependencyProperty
|
ItemsSourceProperty
Represents the ItemsSource dependency property.
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
System.Windows.DependencyProperty
|
ItemTemplateProperty
Represents the ItemTemplate dependency property.
Declaration
public static readonly DependencyProperty ItemTemplateProperty
Field Value
System.Windows.DependencyProperty
|
SelectedValueMemberPathProperty
Represents the ValueMemberPath dependency property.
Declaration
public static readonly DependencyProperty SelectedValueMemberPathProperty
Field Value
System.Windows.DependencyProperty
|
Properties
DisplayMemberPath
Gets or sets the path to the property containing the data to display.
Declaration
public string DisplayMemberPath { get; set; }
Property Value
System.String
The display member path. |
EmptyText
Gets or sets a string that should be displayed in the GridViewCell element when there is no selection in the GridViewComboBoxColumn. This is a dependency property.
Declaration
public string EmptyText { get; set; }
Property Value
System.String
|
IsComboBoxEditable
Gets or sets a value indicating whether the user can edit text in the text box portion of the ComboBox editor.
Declaration
public bool IsComboBoxEditable { get; set; }
Property Value
System.Boolean
|
IsLightweightModeEnabled
Gets or sets a value indicating whether the LightweightMode of the ComboBoxColumn is enabled.
Declaration
public bool IsLightweightModeEnabled { get; set; }
Property Value
System.Boolean
|
ItemsSource
Gets or sets the the list of items used in the column to display lookup data. The ComboBox editor will also attach to this ItemsSource.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
System.Collections.IEnumerable
The items source. |
ItemsSourceBinding
Gets or sets the Binding for the ComboBoxEditor ItemsSource. This is a dependency property.
Declaration
public Binding ItemsSourceBinding { get; set; }
Property Value
System.Windows.Data.Binding
The default value is null |
ItemTemplate
Gets or sets the item template used to represent the selected item in cells.
Declaration
public DataTemplate ItemTemplate { get; set; }
Property Value
System.Windows.DataTemplate
The item template. |
LookupValueConverter
Gets or sets the lookup value converter used to convert value member value to display value.
Declaration
public IValueConverter LookupValueConverter { get; set; }
Property Value
System.Windows.Data.IValueConverter
The lookup value converter. |
SelectedValueMemberPath
Gets or sets the value member path.
Declaration
public string SelectedValueMemberPath { get; set; }
Property Value
System.String
The value member path. |
Methods
CopyPropertiesFrom(GridViewColumn)
Copy properties from source column.
Declaration
public override void CopyPropertiesFrom(GridViewColumn source)
Parameters
GridViewColumn
source
|
Overrides
CreateCellEditElement(GridViewCell, Object)
Creates the element for the cell in edit mode.
Declaration
public override FrameworkElement CreateCellEditElement(GridViewCell cell, object dataItem)
Parameters
GridViewCell
cell
|
System.Object
dataItem
|
Returns
System.Windows.FrameworkElement
|
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 override object GetCellContent(object item)
Parameters
System.Object
item
The data item. |
Returns
System.Object
Cell content. |
Overrides
GetDisplayCellContent(Object)
Generates the cell content of GridViewBoundColumnBase.
Declaration
protected override object GetDisplayCellContent(object item)
Parameters
System.Object
item
|
Returns
System.Object
|
Overrides
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
SortDistinctValues(IQueryable)
Sorts the distinct values.
Declaration
protected override IQueryable SortDistinctValues(IQueryable source)
Parameters
System.Linq.IQueryable
source
The unsorted distinct values. |
Returns
System.Linq.IQueryable
The sorted distinct values. |