ListDataLayer
Manages the bound or unbound data source, current item/position and value formatting for a RadListElement.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class ListDataLayer : IDataItemSource, IDisposable
Inheritance: objectListDataLayer
Implements:
Constructors
Properties
Gets or sets the binding context used to resolve the bound data source's currency manager.
public BindingContext BindingContext { get; }
Implements:
Gets or sets whether adding a new item automatically makes it the current item.
public bool ChangeCurrentOnAdd { get; set; }
Gets or sets the name of the boolean data source field bound to each item's checked state.
public string CheckedMember { get; set; }
Gets or sets the item that is the current position in the underlying data view.
public RadListDataItem CurrentItem { get; set; }
Gets or sets the index of the current item within the data view; -1 when no item is current.
public int CurrentPosition { get; set; }
Gets or sets the name of the list or table within DataSource to bind to, when the data source contains multiple lists.
public string DataMember { get; set; }
Gets or sets the object providing data for the list; setting it discards any cached value converter.
public object DataSource { get; set; }
Gets the collection view that applies sorting, filtering and grouping to the list's items.
public RadCollectionView<RadListDataItem> DataView { get; }
Gets or sets the name of the data source field used for an item's supplementary description text.
public string DescriptionTextMember { get; set; }
Gets or sets the name of the data source field whose value is displayed for each item; changing it refreshes cached item text.
public string DisplayMember { get; set; }
Gets the collection of items currently displayed by the list.
public RadListDataItemCollection Items { get; }
Gets the underlying source that bridges the bound data source and the collection of RadListDataItem objects.
public RadListSource<RadListDataItem> ListSource { get; }
Gets the list element that owns this data layer.
public RadListElement Owner { get; }
Gets or sets the name of the data source field that supplies each item's underlying value (as opposed to its displayed text).
public string ValueMember { get; set; }
Methods
protected virtual void CollectionView_CurrentChanging(object sender, CancelEventArgs e)
protected virtual RadListDataItemCollection CreateItemsCollection(RadListElement owner)
Unwires internal event handlers and disposes the underlying list source.
public void Dispose()
Implements:
public object GetDescriptionTextValue(RadListDataItem item)
Gets the raw display-member value for the specified item from the bound data source, or the item's own value when unbound.
Gets the item located at the specified position in the data view.
Gets the items between the specified positions, inclusive of both bounds.
public List<RadListDataItem> GetItemRange(int startIndex, int endIndex)
List<RadListDataItem>
Gets the position of the specified item's underlying row within the data view.
Converts the item's display value to its string representation using the cached string converter.
Gets the value-member value for the specified item, used as the item's underlying value distinct from its display text.
Gets the number of items currently passing the active filter.
Performs one-time setup of the data layer after construction; raises Initialized.
public void Initialize()
Implements:
Creates a new, unattached data item compatible with this list's item type.
Forces the underlying data view to re-evaluate sorting, filtering and grouping.
public void Refresh()
protected virtual void UnwireEvents()
protected virtual void WireEvents()
Events
Occurs after BindingContext has changed.
public event EventHandler BindingContextChanged
Implements:
Occurs after CurrentPosition has changed.
public event PositionChangedEventHandler CurrentPositionChanged
Occurs before CurrentPosition changes, allowing the change to be canceled.
public event PositionChangingEventHandler CurrentPositionChanging
Occurs after the data layer has completed initialization.
public event EventHandler Initialized