Class DataControl
Represents a control that provides common functionality for all Telerik WPF controls that represent data.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Data.dll
Syntax
public abstract class DataControl : Control, INotifyPropertyChanged, ISelectorInternal
Constructors
DataControl()
Fields
CanUserSelectProperty
Identifies the Can
Declaration
public static readonly DependencyProperty CanUserSelectProperty
Field Value
System.
|
CurrentItemProperty
Identifies the Current
Declaration
public static readonly DependencyProperty CurrentItemProperty
Field Value
System.
|
IsSynchronizedWithCurrentItemProperty
Identifies the Is
Declaration
public static readonly DependencyProperty IsSynchronizedWithCurrentItemProperty
Field Value
System.
|
ItemsSourceProperty
Identifies the Items
Declaration
public static readonly DependencyProperty ItemsSourceProperty
Field Value
System.
|
SelectedItemProperty
Identifies the Selected
Declaration
public static readonly DependencyProperty SelectedItemProperty
Field Value
System.
|
SelectionChangedEvent
Identifies the Selection
Declaration
public static readonly RoutedEvent SelectionChangedEvent
Field Value
System.
|
SelectionChangingEvent
Identifies the Selection
Declaration
public static readonly RoutedEvent SelectionChangingEvent
Field Value
System.
|
Properties
CanUserSelect
Gets or sets a value indicating whether the user can select rows.
Declaration
public bool CanUserSelect { get; set; }
Property Value
System.
|
CurrentItem
Gets the data item bound to the row that contains the current cell.
Declaration
public object CurrentItem { get; set; }
Property Value
System. The data item bound to the row that contains the current cell. |
IsSynchronizedWithCurrentItem
Gets or sets a value that indicates whether Data
Declaration
public Nullable<bool> IsSynchronizedWithCurrentItem { get; set; }
Property Value
System. True if the SelectedItem is always synchronized with the current item; false if the SelectedItem is never synchronized; null if the SelectedItem is synchronized with the current item only if a CollectionView is used. |
Items
Items is the collection of data that is used to generate the content of this control.
Declaration
public DataItemCollection Items { get; }
Property Value
ItemsSource
Gets or sets a collection that is used to generate the content of the control.
Declaration
public object ItemsSource { get; set; }
Property Value
System. The collection that is used to generate the content of the control. The default is null. |
SelectedItem
Gets or sets the data item corresponding to the selected row.
Declaration
public object SelectedItem { get; set; }
Property Value
System. The data item corresponding to the selected row. |
Remarks
If the SelectionMode property is set to Extended and multiple rows are selected, use the SelectedItems property to retrieve all selected items.
SelectedItems
Gets a collection that contains the data items corresponding to the selected rows.
Declaration
public ObservableCollection<object> SelectedItems { get; }
Property Value
System. A collection of the data items corresponding to the selected rows. |
Remarks
If the SelectionMode property is set to Single, the SelectedItems list will contain only the SelectedItem property value.
ShouldHandleSelection
Gets a value indicating whether this instance handles selection events and participates in the selection mechanism.
Declaration
protected virtual bool ShouldHandleSelection { get; }
Property Value
System.
|
TableDefinition
Gets the TableDefinition object for the current record collection.
Declaration
public TableDefinition TableDefinition { get; }
Property Value
Methods
CreateTableDefinition()
Creates the specific table definition for the Data
Declaration
protected virtual TableDefinition CreateTableDefinition()
Returns
Table The newly created Table |
InitializeSelection()
Initializes the selection.
Declaration
protected virtual void InitializeSelection()
OnCanUserSelectChanged(Boolean, Boolean)
Called when property CanUserSelect changes.
Declaration
protected virtual void OnCanUserSelectChanged(bool oldValue, bool newValue)
Parameters
System. Old property value. |
System. New property value. |
OnCurrentItemChanged()
Called when the current item of the Data
Declaration
protected virtual void OnCurrentItemChanged()
OnItemsCollectionChanged(Object, NotifyCollectionChangedEventArgs)
Called when this.Items collection changes.
Declaration
protected virtual void OnItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
System. The sender. |
System. The System. |
OnItemsPropertyChanged(Object, PropertyChangedEventArgs)
Called when this.Items has a property changed.
Declaration
protected virtual void OnItemsPropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
System. The sender. |
System. The System. |
OnItemsSourceChanged(Object, Object)
Called when ItemsSource property has changed.
Declaration
protected virtual void OnItemsSourceChanged(object oldValue, object newValue)
Parameters
System. The old value. |
System. The new value. |
OnPropertyChanged(String)
Called when a property changes.
Declaration
protected virtual void OnPropertyChanged(string propertyName)
Parameters
System. Name of the property. |
OnSelectedItemChanged(Object, Object)
Called when the selected item of the Data
Declaration
protected virtual void OnSelectedItemChanged(object oldItem, object newItem)
Parameters
System.
|
System.
|
OnSelectionChanging(SelectionChangingEventArgs)
Raises the Selection
Declaration
protected virtual void OnSelectionChanging(SelectionChangingEventArgs args)
Parameters
Selection The Selection |
RaiseSelectionChangedEvent(SelectionChangeEventArgs)
Raises the selection changed event.
Declaration
protected virtual void RaiseSelectionChangedEvent(SelectionChangeEventArgs args)
Parameters
Selection The Selection |
Rebind()
Rebinds the grid.
Declaration
public void Rebind()
SetIsCurrent(Object, Boolean)
Sets the current state for a container that wraps a given data item.
Declaration
protected abstract void SetIsCurrent(object item, bool isCurrent)
Parameters
System. The data item. |
System. If set to |
SetIsSelected(Object, Boolean)
Sets the selection state for a container that wraps a given data item.
Declaration
protected abstract void SetIsSelected(object item, bool isSelected)
Parameters
System. The data item. |
System. If set to |
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.
|
SelectionChanged
Occurs when the selected items have changed.
Declaration
public event EventHandler<SelectionChangeEventArgs> SelectionChanged
Event Type
System.
|
SelectionChanging
Occurs when the selected items are about to change.
Declaration
public event EventHandler<SelectionChangingEventArgs> SelectionChanging
Event Type
System.
|