ClassRadListControl
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
RadListControl()
Initializes a new instance of the RadListControl class with default settings.
Declaration
public RadListControl()
Fields
CreatingVisualListItemEventKey
Declaration
public static readonly object CreatingVisualListItemEventKey
Field Value
ListItemDataBindingEventKey
Declaration
public static readonly object ListItemDataBindingEventKey
Field Value
ListItemDataBoundEventKey
Declaration
public static readonly object ListItemDataBoundEventKey
Field Value
SelectedIndexChangedEventKey
Declaration
public static readonly object SelectedIndexChangedEventKey
Field Value
SelectedIndexChangingEventKey
Declaration
public static readonly object SelectedIndexChangingEventKey
Field Value
SelectedValueChangedEventKey
Declaration
public static readonly object SelectedValueChangedEventKey
Field Value
SortStyleChangedEventKey
Declaration
public static readonly object SortStyleChangedEventKey
Field Value
VisualItemFormattingEventKey
Declaration
public static readonly object VisualItemFormattingEventKey
Field Value
Properties
ActiveItem
Gets or sets the active item that receives focus for keyboard navigation in multi-selection modes.
Declaration
[Browsable(false)]
public RadListDataItem ActiveItem { get; set; }
Property Value
AllowDragDrop
Gets or sets a value indicating whether users can reorder items using drag and drop operations.
Declaration
[Browsable(true)]
public bool AllowDragDrop { get; set; }
Property Value
AutoSizeItems
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.
Declaration
[Browsable(true)]
public bool AutoSizeItems { get; set; }
Property Value
CaseSensitiveSort
Gets or sets a value indicating whether text case sensitivity is considered during sorting operations.
Declaration
[Browsable(true)]
public bool CaseSensitiveSort { get; set; }
Property Value
DataMember
Gets or sets the name of the data member to bind to when the DataSource contains multiple tables or lists.
Declaration
[Browsable(true)]
public string DataMember { get; set; }
Property Value
DataSource
Gets or sets the data source that provides the items to be displayed in the RadListControl.
Declaration
[Browsable(true)]
public object DataSource { get; set; }
Property Value
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
DescriptionTextMember
Gets or sets the property name used to extract description text from data items for additional item information display.
Declaration
[Browsable(true)]
public string DescriptionTextMember { get; set; }
Property Value
DisplayMember
Gets or sets the property name used to extract display text from data items for visual representation in the list.
Declaration
[TypeConverter("System.Windows.Forms.Design.DataMemberFieldConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[Browsable(true)]
public string DisplayMember { get; set; }
Property Value
EnableAlternatingItemColor
Gets or sets a value indicating whether alternating background colors are applied to list items for improved readability.
Declaration
[Browsable(true)]
public virtual bool EnableAlternatingItemColor { get; set; }
Property Value
EnableKineticScrolling
Gets or sets a value indicating whether kinetic scrolling is enabled for smooth touch-based scrolling interactions.
Declaration
[Browsable(true)]
public bool EnableKineticScrolling { get; set; }
Property Value
EnableUIAutomation
Gets or sets a value indicating whether the UI Automation functionality is enabled.
Declaration
public override bool EnableUIAutomation { get; set; }
Property Value
Overrides
Implements
Filter
Gets or sets a predicate which filters which items can be visible.
Declaration
[Browsable(false)]
public Predicate<RadListDataItem> Filter { get; set; }
Property Value
FilterExpression
Gets or sets a filter expression string that determines which items are visible in the list based on the specified criteria.
Declaration
[Browsable(true)]
public string FilterExpression { get; set; }
Property Value
FindStringComparer
Gets or sets an implementation of IFindStringComparer used for customizing string comparison behavior in the FindString method.
Declaration
[Browsable(false)]
public IFindStringComparer FindStringComparer { get; set; }
Property Value
FitItemsToSize
Gets or sets a value indicating whether items are automatically resized to fit the control's width.
FormatString
Gets or sets a format string which will be used for visual formatting of the items text.
Declaration
[Browsable(true)]
public string FormatString { get; set; }
Property Value
FormattingEnabled
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.
Declaration
[Browsable(true)]
public bool FormattingEnabled { get; set; }
Property Value
IsFilterActive
Gets a value indicating whether any filtering is currently active, either through a Filter delegate or FilterExpression.
Declaration
[Browsable(false)]
public bool IsFilterActive { get; }
Property Value
ItemHeight
Gets or sets the height of individual list items in pixels.
Declaration
[Browsable(true)]
public int ItemHeight { get; set; }
Property Value
ItemTextComparisonMode
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.
Declaration
[Browsable(false)]
public ItemTextComparisonMode ItemTextComparisonMode { get; set; }
Property Value
Items
Gets the collection of data items contained in the RadListControl. Items cannot be modified in data bound mode.
Declaration
[Browsable(true)]
public RadListDataItemCollection Items { get; }
Property Value
KeyboardSearchEnabled
Gets or sets a value indicating whether users can search for items by typing characters while the RadListControl has focus.
Declaration
[Browsable(true)]
public bool KeyboardSearchEnabled { get; set; }
Property Value
KeyboardSearchResetInterval
Gets or sets the time interval in milliseconds that the user must wait before the keyboard search functionality is reset.
Declaration
[Browsable(true)]
public int KeyboardSearchResetInterval { get; set; }
Property Value
ListElement
Gets the main element that provides the list functionality and serves as the core component of the RadListControl.
Declaration
[Browsable(false)]
public RadListElement ListElement { get; set; }
Property Value
ScrollMode
Gets or set the scroll mode.
Declaration
[Browsable(true)]
public ItemScrollerScrollModes ScrollMode { get; set; }
Property Value
SelectedIndex
Gets or sets the currently selected index.
Declaration
[Browsable(false)]
public int SelectedIndex { get; set; }
Property Value
SelectedItem
Gets or sets the currently selected item.
Declaration
[Browsable(false)]
[Bindable(true)]
public RadListDataItem SelectedItem { get; set; }
Property Value
SelectedItems
Gets a read-only collection of the currently selected items in the RadListControl.
Declaration
[Browsable(false)]
public IReadOnlyCollection<RadListDataItem> SelectedItems { get; }
Property Value
SelectedValue
Gets or sets the value of the currently selected item based on the ValueMember property.
Declaration
[Browsable(false)]
[Bindable(true)]
public object SelectedValue { get; set; }
Property Value
SelectionMode
Gets or sets the selection mode that determines how items can be selected in the RadListControl.
Declaration
[Browsable(true)]
public SelectionMode SelectionMode { get; set; }
Property Value
SortStyle
Gets or sets the sorting behavior applied to the list items.
Declaration
[Browsable(true)]
public SortStyle SortStyle { get; set; }
Property Value
SuspendItemsChangeEvents
Gets or sets a value indicating whether the ItemsChanging and ItemsChanged events are temporarily suspended from firing.
Declaration
[Browsable(false)]
public bool SuspendItemsChangeEvents { get; set; }
Property Value
SuspendSelectionEvents
Gets or sets a value that determines whether to stop the selection events from firing. These are SelectedIndexChanged, SelectedIndexChanging and SelectedValueChanged.
Declaration
[Browsable(false)]
public bool SuspendSelectionEvents { get; set; }
Property Value
ValueMember
Gets or sets the property name used to extract values from data items, which will be accessible through the Value property of each RadListDataItem.
Declaration
[Browsable(true)]
public string ValueMember { get; set; }
Property Value
Methods
BeginUpdate()
Suspends internal notifications and processing to improve performance during bulk operations. This method is cumulative, requiring matching calls to EndUpdate().
Declaration
public void BeginUpdate()
CanEditElementAtDesignTime(RadElement)
Determines whether an element may be edited via the EditUIElements dialog at design-time.
Declaration
protected override bool CanEditElementAtDesignTime(RadElement element)
Parameters
element
Returns
Overrides
ClearMeasuredSize()
Declaration
protected virtual void ClearMeasuredSize()
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
Overrides
CreateChildItems(RadElement)
Creates the child elements for the RadListControl.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
parent
The parent element that will contain the child elements.
Overrides
CreateListElement()
Creates and returns a new instance of the RadListElement that provides the core list functionality.
Declaration
protected virtual RadListElement CreateListElement()
Returns
A new RadListElement instance.
DeferRefresh()
Creates a disposable object that defers refresh operations until disposed, allowing multiple changes to be batched together.
Declaration
public virtual IDisposable DeferRefresh()
Returns
An IDisposable object that resumes refresh operations when disposed.
Dispose(bool)
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
Overrides
EndUpdate()
Resumes internal notifications and processing previously suspended by BeginUpdate().
Declaration
public void EndUpdate()
FindItemExact(string, bool)
Declaration
public RadListDataItem FindItemExact(string text, bool caseSensitive)
Parameters
text
caseSensitive
Returns
FindString(string)
Searches for an item that matches the specified string using the configured FindStringComparer, starting from the beginning of the list.
FindString(string, int)
Searches for an item that matches the specified string using the configured FindStringComparer, starting from the specified index.
FindStringExact(string)
Searches for an item with text that exactly matches the specified string, starting from the beginning of the list.
FindStringExact(string, int)
Searches for an item with text that exactly matches the specified string, starting from the specified index.
FindStringNonWrapping(string)
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.
FindStringNonWrapping(string, int)
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.
HandleEndKey()
Declaration
protected virtual void HandleEndKey()
HandleHomeKey()
Declaration
protected virtual void HandleHomeKey()
HandlePageDownKey()
Declaration
protected virtual void HandlePageDownKey()
HandlePageUpKey()
Declaration
protected virtual void HandlePageUpKey()
OnCreatingVisualItem(object, CreatingVisualListItemEventArgs)
Declaration
protected virtual void OnCreatingVisualItem(object sender, CreatingVisualListItemEventArgs args)
Parameters
sender
args
OnDataBindingComplete(object, ListBindingCompleteEventArgs)
Raises the DataBindingComplete event.
Declaration
protected virtual void OnDataBindingComplete(object sender, ListBindingCompleteEventArgs e)
Parameters
sender
e
An ListBindingCompleteEventArgs instance that contains the event data.
OnEnabledChanged(EventArgs)
Declaration
protected override void OnEnabledChanged(EventArgs e)
Parameters
e
Overrides
OnGotFocus(EventArgs)
Declaration
protected override void OnGotFocus(EventArgs e)
Parameters
e
Overrides
OnItemDataBinding(object, ListItemDataBindingEventArgs)
Declaration
protected virtual void OnItemDataBinding(object sender, ListItemDataBindingEventArgs args)
Parameters
sender
args
OnItemDataBound(object, ListItemDataBoundEventArgs)
Declaration
protected virtual void OnItemDataBound(object sender, ListItemDataBoundEventArgs args)
Parameters
sender
args
OnKeyDown(KeyEventArgs)
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
Overrides
OnLoad(Size)
Notifies that the control is about to be visualized.
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
desiredSize
Overrides
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
e
Overrides
OnMouseMove(MouseEventArgs)
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
e
Overrides
OnMouseUp(MouseEventArgs)
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
e
Overrides
OnMouseWheel(MouseEventArgs)
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
e
Overrides
OnSortStyleChanged(object, SortStyleChangedEventArgs)
Declaration
protected virtual void OnSortStyleChanged(object sender, SortStyleChangedEventArgs args)
Parameters
sender
args
OnVisualItemFormatting(object, VisualItemFormattingEventArgs)
Declaration
protected virtual void OnVisualItemFormatting(object sender, VisualItemFormattingEventArgs args)
Parameters
sender
args
ProcessCodedUIMessage(ref IPCMessage)
Declaration
protected override void ProcessCodedUIMessage(ref IPCMessage request)
Parameters
request
IPCMessage
Overrides
Rebind()
Forces re-evaluation of the current data source (if any).
Declaration
public void Rebind()
ScrollByPage(int)
Scrolls the view by the specified number of pages.
Declaration
public void ScrollByPage(int pageCount)
Parameters
pageCount
The number of pages to scroll. Positive values scroll down, negative values scroll up.
ScrollToItem(RadListDataItem)
Scrolls the view to make the specified item visible, positioning it appropriately within the visible area.
Declaration
public void ScrollToItem(RadListDataItem item)
Parameters
item
The RadListDataItem to scroll to.
SelectAll()
Selects all items in the list if the current SelectionMode allows multiple selection.
Declaration
public void SelectAll()
Exceptions
Thrown when SelectionMode is One or None.
SelectRange(int, int)
Clears current selection and selects all items within the specified index range.
UnwireEvents()
Unsubscribes from the relevant events of the underlying RadListElement.
Declaration
protected virtual void UnwireEvents()
WireEvents()
Subscribes to the relevant events of the underlying RadListElement.
Declaration
protected virtual void WireEvents()
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
m
Overrides
Events
CreatingVisualListItem
Occurs when custom visual items need to be created, allowing users to provide custom visual representations for list items.
Declaration
public event CreatingVisualListItemEventHandler CreatingVisualListItem
Event Value
DataBindingComplete
Fires after data binding operation has finished.
Declaration
[Browsable(true)]
public event ListBindingCompleteEventHandler DataBindingComplete
Event Value
ItemDataBinding
Occurs before a RadListDataItem is data bound, allowing customization of the data binding process and providing custom item instances.
Declaration
public event ListItemDataBindingEventHandler ItemDataBinding
Event Value
ItemDataBound
Occurs after a RadListDataItem has been data bound, providing an opportunity to modify the bound item.
Declaration
public event ListItemDataBoundEventHandler ItemDataBound
Event Value
SelectedIndexChanged
This event fires when the selected index property changes.
Declaration
public event PositionChangedEventHandler SelectedIndexChanged
Event Value
SelectedIndexChanging
This event fires before SelectedIndex changes. This event allows the operation to be cancelled.
Declaration
public event PositionChangingEventHandler SelectedIndexChanging
Event Value
SelectedItemsChanged
Occurs when the SelectedItems collection changes due to selection modifications.
Declaration
public event NotifyCollectionChangedEventHandler SelectedItemsChanged
Event Value
SelectedItemsChanging
This event fires before the SelectedItems collection changes.
Declaration
public event NotifyCollectionChangingEventHandler SelectedItemsChanging
Event Value
SelectedValueChanged
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.
Declaration
public event EventHandler SelectedValueChanged
Event Value
SortStyleChanged
Occurs when the SortStyle property value changes.
Declaration
public event SortStyleChangedEventHandler SortStyleChanged
Event Value
VisualItemFormatting
Occurs when visual item formatting is needed, allowing customization of the appearance of visible list items.
Declaration
public event VisualListItemFormattingEventHandler VisualItemFormatting
Event Value