RadListControl
Represents a list control that displays data in a list layout similar to the standard ListBox control, providing advanced features such as data binding, virtualization, and custom item rendering.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Data Controls")]
[ComplexBindingProperties("DataSource", "ValueMember")]
[LookupBindingProperties("DataSource", "DisplayMember", "ValueMember", "SelectedValue")]
[ClassInterface(ClassInterfaceType.AutoDispatch)]
[ComVisible(true)]
public class RadListControl : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider, ISupportRootUIAutomation
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadListControl...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadListControl class with default settings.
public RadListControl()
Fields
public static readonly object CreatingVisualListItemEventKey
public static readonly object ListItemDataBindingEventKey
public static readonly object ListItemDataBoundEventKey
public static readonly object SelectedIndexChangedEventKey
public static readonly object SelectedIndexChangingEventKey
public static readonly object SelectedValueChangedEventKey
public static readonly object SortStyleChangedEventKey
public static readonly object VisualItemFormattingEventKey
Properties
Gets or sets the active item that receives focus for keyboard navigation in multi-selection modes.
[Browsable(false)]
public RadListDataItem ActiveItem { get; set; }
Gets or sets a value indicating whether users can reorder items using drag and drop operations.
[Browsable(true)]
public bool AllowDragDrop { get; set; }
Gets or sets a value that indicates whether items will be sized according to their content. If this property is true the user can set the Height property of each individual RadListDataItem in the Items collection in order to override the automatic sizing.
[Browsable(true)]
public bool AutoSizeItems { get; set; }
Gets or sets a value indicating whether text case sensitivity is considered during sorting operations.
[Browsable(true)]
public bool CaseSensitiveSort { get; set; }
Gets or sets the name of the data member to bind to when the DataSource contains multiple tables or lists.
[Browsable(true)]
public string DataMember { get; set; }
Gets or sets the data source that provides the items to be displayed in the RadListControl.
[Browsable(true)]
public object DataSource { get; set; }
protected override Size DefaultSize { get; }
Overrides:
Gets or sets the property name used to extract description text from data items for additional item information display.
[Browsable(true)]
public string DescriptionTextMember { get; set; }
Gets or sets the property name used to extract display text from data items for visual representation in the list.
[TypeConverter("System.Windows.Forms.Design.DataMemberFieldConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[Browsable(true)]
public string DisplayMember { get; set; }
Gets or sets a value indicating whether alternating background colors are applied to list items for improved readability.
[Browsable(true)]
public virtual bool EnableAlternatingItemColor { get; set; }
Gets or sets a value indicating whether kinetic scrolling is enabled for smooth touch-based scrolling interactions.
[Browsable(true)]
public bool EnableKineticScrolling { get; set; }
Gets or sets a value indicating whether the UI Automation functionality is enabled.
public override bool EnableUIAutomation { get; set; }
Overrides:
Implements:
Gets or sets a predicate which filters which items can be visible.
[Browsable(false)]
public Predicate<RadListDataItem> Filter { get; set; }
Gets or sets a filter expression string that determines which items are visible in the list based on the specified criteria.
[Browsable(true)]
public string FilterExpression { get; set; }
Gets or sets an implementation of IFindStringComparer used for customizing string comparison behavior in the FindString method.
[Browsable(false)]
public IFindStringComparer FindStringComparer { get; set; }
Gets or sets a value indicating whether items are automatically resized to fit the control's width.
public bool FitItemsToSize { get; set; }
Gets or sets a format string which will be used for visual formatting of the items text.
[Browsable(true)]
public string FormatString { get; set; }
Gets or sets a value that indicates whether the FormatString and FormatInfo properties will be used to format the items text. Setting this property to false may improve performance.
[Browsable(true)]
public bool FormattingEnabled { get; set; }
Gets a value indicating whether any filtering is currently active, either through a Filter delegate or FilterExpression.
[Browsable(false)]
public bool IsFilterActive { get; }
Gets or sets the height of individual list items in pixels.
[Browsable(true)]
public int ItemHeight { get; set; }
Gets the collection of data items contained in the RadListControl. Items cannot be modified in data bound mode.
[Browsable(true)]
public RadListDataItemCollection Items { get; }
Gets or sets the text comparison mode that determines whether the FindString method searches using user-specified text or data-bound text from the DisplayMember.
[Browsable(false)]
public ItemTextComparisonMode ItemTextComparisonMode { get; set; }
Gets or sets a value indicating whether users can search for items by typing characters while the RadListControl has focus.
[Browsable(true)]
public bool KeyboardSearchEnabled { get; set; }
Gets or sets the time interval in milliseconds that the user must wait before the keyboard search functionality is reset.
[Browsable(true)]
public int KeyboardSearchResetInterval { get; set; }
Gets the main element that provides the list functionality and serves as the core component of the RadListControl.
[Browsable(false)]
public RadListElement ListElement { get; set; }
Gets or set the scroll mode.
[Browsable(true)]
public ItemScrollerScrollModes ScrollMode { get; set; }
Gets or sets the currently selected index.
[Browsable(false)]
public int SelectedIndex { get; set; }
Gets or sets the currently selected item.
[Browsable(false)]
[Bindable(true)]
public RadListDataItem SelectedItem { get; set; }
Gets a read-only collection of the currently selected items in the RadListControl.
[Browsable(false)]
public IReadOnlyCollection<RadListDataItem> SelectedItems { get; }
Gets or sets the value of the currently selected item based on the ValueMember property.
[Browsable(false)]
[Bindable(true)]
public object SelectedValue { get; set; }
Gets or sets the selection mode that determines how items can be selected in the RadListControl.
[Browsable(true)]
public SelectionMode SelectionMode { get; set; }
Gets or sets the sorting behavior applied to the list items.
[Browsable(true)]
public SortStyle SortStyle { get; set; }
Gets or sets a value indicating whether the ItemsChanging and ItemsChanged events are temporarily suspended from firing.
[Browsable(false)]
public bool SuspendItemsChangeEvents { get; set; }
Gets or sets a value that determines whether to stop the selection events from firing. These are SelectedIndexChanged, SelectedIndexChanging and SelectedValueChanged.
[Browsable(false)]
public bool SuspendSelectionEvents { get; set; }
Gets or sets the property name used to extract values from data items, which will be accessible through the Value property of each RadListDataItem.
[Browsable(true)]
public string ValueMember { get; set; }
Methods
Suspends internal notifications and processing to improve performance during bulk operations. This method is cumulative, requiring matching calls to EndUpdate().
public void BeginUpdate()
Determines whether an element may be edited via the EditUIElements dialog at design-time.
protected override bool CanEditElementAtDesignTime(RadElement element)
Overrides:
protected virtual void ClearMeasuredSize()
protected override AccessibleObject CreateAccessibilityInstance()
Overrides:
Creates the child elements for the RadListControl.
protected override void CreateChildItems(RadElement parent)
The parent element that will contain the child elements.
Overrides:
Creates and returns a new instance of the RadListElement that provides the core list functionality.
Creates a disposable object that defers refresh operations until disposed, allowing multiple changes to be batched together.
public virtual IDisposable DeferRefresh()
An IDisposable object that resumes refresh operations when disposed.
Resumes layout.
public override void EndInit()
Overrides:
Resumes internal notifications and processing previously suspended by BeginUpdate().
public void EndUpdate()
Searches for an item that matches the specified string using the configured FindStringComparer, starting from the specified index.
Searches for an item that matches the specified string using the configured FindStringComparer, starting from the beginning of the list.
Searches for an item with text that exactly matches the specified string, starting from the specified index.
Searches for an item in the same manner as FindString() but does not start from the beginning when the end of the Items collection is reached.
Searches for an item in the same manner as FindString() but does not start from the beginning when the end of the Items collection is reached.
protected virtual void HandleEndKey()
protected virtual void HandleHomeKey()
protected virtual void HandlePageDownKey()
protected virtual void HandlePageUpKey()
protected virtual void OnCreatingVisualItem(object sender, CreatingVisualListItemEventArgs args)
Raises the DataBindingComplete event.
protected virtual void OnDataBindingComplete(object sender, ListBindingCompleteEventArgs e)
An ListBindingCompleteEventArgs instance that contains the event data.
protected virtual void OnItemDataBinding(object sender, ListItemDataBindingEventArgs args)
protected virtual void OnItemDataBound(object sender, ListItemDataBoundEventArgs args)
Notifies that the control is about to be visualized.
protected virtual void OnSortStyleChanged(object sender, SortStyleChangedEventArgs args)
protected virtual void OnVisualItemFormatting(object sender, VisualItemFormattingEventArgs args)
protected override void ProcessCodedUIMessage(ref IPCMessage request)
Overrides:
Forces re-evaluation of the current data source (if any).
public void Rebind()
Scrolls the view by the specified number of pages.
public void ScrollByPage(int pageCount)
The number of pages to scroll. Positive values scroll down, negative values scroll up.
Scrolls the view to make the specified item visible, positioning it appropriately within the visible area.
public void ScrollToItem(RadListDataItem item)
The RadListDataItem to scroll to.
Selects all items in the list if the current SelectionMode allows multiple selection.
public void SelectAll()
Thrown when SelectionMode is One or None.
Unsubscribes from the relevant events of the underlying RadListElement.
protected virtual void UnwireEvents()
Subscribes to the relevant events of the underlying RadListElement.
protected virtual void WireEvents()
Events
Occurs when custom visual items need to be created, allowing users to provide custom visual representations for list items.
public event CreatingVisualListItemEventHandler CreatingVisualListItem
Fires after data binding operation has finished.
[Browsable(true)]
public event ListBindingCompleteEventHandler DataBindingComplete
Occurs before a RadListDataItem is data bound, allowing customization of the data binding process and providing custom item instances.
public event ListItemDataBindingEventHandler ItemDataBinding
Occurs after a RadListDataItem has been data bound, providing an opportunity to modify the bound item.
public event ListItemDataBoundEventHandler ItemDataBound
This event fires when the selected index property changes.
public event PositionChangedEventHandler SelectedIndexChanged
This event fires before SelectedIndex changes. This event allows the operation to be cancelled.
public event PositionChangingEventHandler SelectedIndexChanging
Occurs when the SelectedItems collection changes due to selection modifications.
public event NotifyCollectionChangedEventHandler SelectedItemsChanged
This event fires before the SelectedItems collection changes.
public event NotifyCollectionChangingEventHandler SelectedItemsChanging
This event fires only if the SelectedValue has really changed. For example it will not fire if the previously selected item has the same value as the newly selected item.
public event EventHandler SelectedValueChanged
Occurs when the SortStyle property value changes.
public event SortStyleChangedEventHandler SortStyleChanged
Occurs when visual item formatting is needed, allowing customization of the appearance of visible list items.
public event VisualListItemFormattingEventHandler VisualItemFormatting