Class RadListElement
This class is used to represent data in a list similar to the ListBox control provided by Microsoft.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadListElement : VirtualizedScrollPanel<RadListDataItem, RadListVisualItem>, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadListElement()
Creates a new instance of the RadListElement class.
Declaration
public RadListElement()
Fields
AlternatingItemColorProperty
CaseSensitiveSortProperty
EnableAlternatingItemColorProperty
Properties
ActiveItem
Gets or sets the active item. This property is meaningful only when SelectionMode is MultiSimple or MultiExtended with the Control key pressed.
Declaration
public RadListDataItem ActiveItem { get; set; }
Property Value
RadListDataItem
|
AllowDragDrop
Gets or sets value indicating if the user can reorder items via drag and drop. Always false when kinetic scrolling is enabled.
Declaration
public bool AllowDragDrop { get; set; }
Property Value
System.Boolean
|
AlternatingItemColor
Gets or sets a value indidcating the alternating item color for odd items.
Declaration
[RadPropertyDefaultValue("AlternatingItemColor", typeof(RadListElement))]
public virtual Color AlternatingItemColor { get; set; }
Property Value
System.Drawing.Color
|
CaseSensitiveSort
Gets or sets a value that indicates whether text case will be taken into account when sorting.
Declaration
public bool CaseSensitiveSort { get; set; }
Property Value
System.Boolean
|
DataLayer
DataMember
Gets or sets the name of the list or table in the data source for which the RadListElement is displaying data.
Declaration
public string DataMember { get; set; }
Property Value
System.String
|
DataSource
Gets or sets the object that is responsible for providing data objects for the RadListElement. Setting this property throws an InvalidOperationException if Items is not empty and the data source is null.
Declaration
public object DataSource { get; set; }
Property Value
System.Object
|
DescriptionTextMember
Gets or sets a string which will be used to get a description text string for each visual item. This property can not be set to null. Setting it to null will cause it to contain an empty string.
Declaration
public string DescriptionTextMember { get; set; }
Property Value
System.String
|
DisplayMember
Gets or sets a string which will be used to get a text string for each visual item. This property can not be set to null. Setting it to null will cause it to contain an empty string.
Declaration
public string DisplayMember { get; set; }
Property Value
System.String
|
DragDropService
Declaration
public ListControlDragDropService DragDropService { get; set; }
Property Value
ListControlDragDropService
|
EnableAlternatingItemColor
Gets or sets a value indicating whether alternating item color is enabled.
Declaration
public virtual bool EnableAlternatingItemColor { get; set; }
Property Value
System.Boolean
|
EnableKineticScrolling
Gets or sets a value indicating whether kinetic scrolling is enabled.
Declaration
public bool EnableKineticScrolling { get; set; }
Property Value
System.Boolean
|
Filter
Gets or sets a Predicate that will be called for every data item in order to determine if the item will be visible.
Declaration
public Predicate<RadListDataItem> Filter { get; set; }
Property Value
System.Predicate<RadListDataItem>
|
FilterExpression
Gets or sets a filter expression that determines which items will be visible.
Declaration
public string FilterExpression { get; set; }
Property Value
System.String
|
FindStringComparer
Gets or sets an object that implements IFindStringComparer. The value of this property is used in the FindString() method when searching for an item.
Declaration
public IFindStringComparer FindStringComparer { get; set; }
Property Value
IFindStringComparer
|
FitItemsToSize
Declaration
public override bool FitItemsToSize { get; set; }
Property Value
System.Boolean
|
Overrides
FormatInfo
Gets or sets an object that implements the IFormatProvider interface. This object is used when formatting items. The default object is CultureInfo.CurrentCulture.
Declaration
public IFormatProvider FormatInfo { get; set; }
Property Value
System.IFormatProvider
|
FormatString
Gets or sets a format string that will be used for visual item formatting if FormattingEnabled is set to true.
Declaration
public string FormatString { get; set; }
Property Value
System.String
|
FormattingEnabled
Gets or sets a value that determines whether text formatting is enabled for the visual items.
Declaration
public bool FormattingEnabled { get; set; }
Property Value
System.Boolean
|
HasSelectedValueChanged
Gets a value indicating whether the SelectedValue property is different after the selection last changed.
Declaration
protected bool HasSelectedValueChanged { get; }
Property Value
System.Boolean
|
IsDescriptionText
Declaration
protected virtual bool IsDescriptionText { get; set; }
Property Value
System.Boolean
|
IsFilterActive
Gets a boolean value that indicates whether the is a filter currently set either with the Filter or FilterExpression properties.
Declaration
public bool IsFilterActive { get; }
Property Value
System.Boolean
|
IsUpdating
Declaration
public virtual bool IsUpdating { get; }
Property Value
System.Boolean
|
ItemHeight
Gets or sets the item height for the items. This property is disregarded when AutoSizeItems is set to true.
Declaration
public int ItemHeight { get; set; }
Property Value
System.Int32
|
ItemsSortComparer
Gets or sets an object that implements IComparer and sorts the items according to its logic.
Declaration
public IComparer<RadListDataItem> ItemsSortComparer { get; set; }
Property Value
System.Collections.Generic.IComparer<RadListDataItem>
|
ItemTextComparisonMode
Gets or sets a value that determines whether the FindString() method searches via the text property set by the user or by the text provided by the data binding logic, that is, by DisplayMember.
Declaration
public ItemTextComparisonMode ItemTextComparisonMode { get; set; }
Property Value
ItemTextComparisonMode
|
KeyboardSearchEnabled
Gets or sets a value that determines whether the user can search for an item by typing characters when RadListElement is focused.
Declaration
public bool KeyboardSearchEnabled { get; set; }
Property Value
System.Boolean
|
KeyboardSearchResetInterval
Gets or sets a value that specifies how long the user must wait before searching with the keyboard is reset. The default value of this property is 300 ms.
Declaration
public int KeyboardSearchResetInterval { get; set; }
Property Value
System.Int32
|
ReadOnly
Gets or sets a value indicating whether the drop down list is read only.
Declaration
public bool ReadOnly { get; set; }
Property Value
System.Boolean
|
ScrollBehavior
Gets the ScrollServiceBehavior that is responsible for the kinetic scrolling option.
Declaration
public ScrollServiceBehavior ScrollBehavior { get; }
Property Value
ScrollServiceBehavior
|
ScrollMode
Gets or sets the scrolling mode.
Declaration
public ItemScrollerScrollModes ScrollMode { get; set; }
Property Value
ItemScrollerScrollModes
|
SelectedIndex
Gets or sets the position of the selection. Setting this property will cause the SelectedIndexChanging and SelectedIndexChanged events to fire.
Declaration
public int SelectedIndex { get; set; }
Property Value
System.Int32
|
SelectedItem
Gets or sets the selected logical list item. Setting this property will cause the selection events to fire.
Declaration
public RadListDataItem SelectedItem { get; set; }
Property Value
RadListDataItem
|
SelectedItems
Provides a readonly interface to the currently selected items.
Declaration
public IReadOnlyCollection<RadListDataItem> SelectedItems { get; }
Property Value
IReadOnlyCollection<RadListDataItem>
|
SelectedValue
Gets or sets the currently selected value. Setting the SelectedValue to a value that is shared between many items causes the first item to be selected. This property triggers the selection events.
Declaration
public object SelectedValue { get; set; }
Property Value
System.Object
|
SelectionMode
Gets or sets the SelectionMode which determines selection behavior of RadListElement.
Declaration
public SelectionMode SelectionMode { get; set; }
Property Value
System.Windows.Forms.SelectionMode
|
SortStyle
Gets or sets the sort style. It can be Ascending, Descending or None. Sorting is performed according to the property specified by DisplayMember.
Declaration
public SortStyle SortStyle { get; set; }
Property Value
SortStyle
|
SuspendItemsChangeEvents
Gets or sets a value that indicates if this RadListElement will stop firing the ItemsChanging and ItemsChanged events.
Declaration
public bool SuspendItemsChangeEvents { get; set; }
Property Value
System.Boolean
|
SuspendSelectionEvents
Gets or sets a value that determines whether to stop the selection events from firing. These are SelectedIndexChanged, SelectedIndexChanging and SelectedValueChanged.
Declaration
public bool SuspendSelectionEvents { get; set; }
Property Value
System.Boolean
|
ValueMember
Gets or sets the string through which the SelectedValue property will be determined. This property can not be set to null. Setting it to null will cause it to contain an empty string.
Declaration
public string ValueMember { get; set; }
Property Value
System.String
|
Methods
BeginUpdate()
Suspends internal notifications and processing in order to improve performance. This method is cumulative, that is, if BeginUpdate is called N times, EndUpdate must also be called N times.
Declaration
public void BeginUpdate()
ClearSelected()
Declaration
public void ClearSelected()
CreateDataLayer()
Creates an instance of the data layer object responsibe for items management in bound or unbound mode.
Declaration
protected virtual ListDataLayer CreateDataLayer()
Returns
ListDataLayer
|
CreateElementProvider()
Creates an instance of the element provider object which is responsible for mapping logical and visual items and determining when a visual item must be updated to reflect the state of its corresponding logical item.
Declaration
protected override IVirtualizedElementProvider<RadListDataItem> CreateElementProvider()
Returns
IVirtualizedElementProvider<RadListDataItem>
|
Overrides
CreateStringComparer()
Declaration
protected virtual IFindStringComparer CreateStringComparer()
Returns
IFindStringComparer
|
CreateViewElement()
Creates an instance of the visual element responsible for displaying the visual items in a particular layout.
Declaration
protected override VirtualizedStackContainer<RadListDataItem> CreateViewElement()
Returns
VirtualizedStackContainer<RadListDataItem>
|
Overrides
DataView_PropertyChanged(Object, PropertyChangedEventArgs)
Declaration
protected void DataView_PropertyChanged(object sender, PropertyChangedEventArgs e)
Parameters
System.Object
sender
|
System.ComponentModel.PropertyChangedEventArgs
e
|
DataViewGroupPredicate(RadListDataItem, Int32)
Declaration
protected object DataViewGroupPredicate(RadListDataItem item, int level)
Parameters
RadListDataItem
item
|
System.Int32
level
|
Returns
System.Object
|
DeferRefresh()
Defers the refresh.
Declaration
public virtual IDisposable DeferRefresh()
Returns
System.IDisposable
|
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
DpiScaleChanged(SizeF)
Declaration
public override void DpiScaleChanged(SizeF scaleFactor)
Parameters
System.Drawing.SizeF
scaleFactor
|
Overrides
EndUpdate()
Resumes the internal notifications and processing previously suspended by BeginUpdate.
Declaration
public void EndUpdate()
FindItemExact(String, Boolean)
Finds the first item in the RadList control that matches the specified string.
Declaration
public RadListDataItem FindItemExact(string text, bool caseSensitive)
Parameters
System.String
text
The string to search for. |
System.Boolean
caseSensitive
Determines whether the search is case sensitive or not. |
Returns
RadListDataItem
The zero-based index of the first item found; returns null if no match is found. |
FindParentListVisualItem(RadElement)
Declaration
protected RadListVisualItem FindParentListVisualItem(RadElement child)
Parameters
RadElement
child
|
Returns
RadListVisualItem
|
FindString(String)
Searches for an item related to the specified string. The relation is described by the object assigned to FindStringComparer property. By default this relation is the System.String.StartsWith(). This method starts searching from the beginning of the items.
Declaration
public int FindString(string s)
Parameters
System.String
s
The string with which every item will be compared. |
Returns
System.Int32
The index of the found item or -1 if no item is found. |
FindString(String, Int32)
Searches for an item related to the specified string. The relation is described by the object assigned to FindStringComparer property. By default FindStringComparer uses the System.String.StartsWith() method. This method starts searching from the specified index. If the algorithm reaches the end of the Items collection it wraps to the beginning and continues until one before the provided index.
Declaration
public int FindString(string s, int startIndex)
Parameters
System.String
s
The string with which every item will be compared. |
System.Int32
startIndex
The index from which to start searching. |
Returns
System.Int32
The index of the found item or -1 if no item is found. |
FindStringExact(String)
Searches for an item in the same manner as FindString() but matches an item only if its text is exactly equal to the provided string.
Declaration
public int FindStringExact(string s)
Parameters
System.String
s
|
Returns
System.Int32
|
FindStringExact(String, Int32)
Searches for an item in the same manner as FindString() but matches an item only if its text is exactly equal to the provided string.
Declaration
public int FindStringExact(string s, int startIndex)
Parameters
System.String
s
|
System.Int32
startIndex
|
Returns
System.Int32
|
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.
Declaration
public int FindStringNonWrapping(string s)
Parameters
System.String
s
The string that will be used to search for an item. |
Returns
System.Int32
The index of the found item or -1 if no item is found. |
FindStringNonWrapping(String, Int32)
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.
Declaration
public int FindStringNonWrapping(string s, int startIndex)
Parameters
System.String
s
The string that will be used to search for an item. |
System.Int32
startIndex
The index from which to start searching. |
Returns
System.Int32
The index of the found item or -1 if no item is found. |
GetDefaultItemHeight()
Declaration
protected virtual int GetDefaultItemHeight()
Returns
System.Int32
|
GetFirstVisibleItemIndex()
Gets the index of the first visible item.
Declaration
protected int GetFirstVisibleItemIndex()
Returns
System.Int32
|
GetIndex(RadListDataItem)
Returns the index of the provided list data item. This index determines the items position in the data view.
Declaration
protected int GetIndex(RadListDataItem item)
Parameters
RadListDataItem
item
The index for which to return an index. |
Returns
System.Int32
Returns the index of the provided item. |
GetLastVisibleItemIndex()
Gets the index of the last visible item.
Declaration
protected int GetLastVisibleItemIndex()
Returns
System.Int32
|
GetMiddleVisibleItemIndex()
Gets the index of the middle visible item.
Declaration
protected int GetMiddleVisibleItemIndex()
Returns
System.Int32
|
GetMinorScrollOffset(Int32)
Declaration
protected int GetMinorScrollOffset(int direction)
Parameters
System.Int32
direction
|
Returns
System.Int32
|
HandleItemsAdded(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void HandleItemsAdded(NotifyCollectionChangedEventArgs args)
Parameters
NotifyCollectionChangedEventArgs
args
|
HandleItemsRemoved(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void HandleItemsRemoved(NotifyCollectionChangedEventArgs args)
Parameters
NotifyCollectionChangedEventArgs
args
|
HandleItemsReplaced(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void HandleItemsReplaced(NotifyCollectionChangedEventArgs args)
Parameters
NotifyCollectionChangedEventArgs
args
|
HandleItemsReset(NotifyCollectionChangedEventArgs)
Declaration
protected virtual void HandleItemsReset(NotifyCollectionChangedEventArgs args)
Parameters
NotifyCollectionChangedEventArgs
args
|
HScrollBar_ValueChanged(Object, EventArgs)
Declaration
protected override void HScrollBar_ValueChanged(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
Overrides
InitializeFields()
Declaration
protected override void InitializeFields()
Overrides
InitializeItemScroller(ItemScroller<RadListDataItem>)
Declaration
protected override void InitializeItemScroller(ItemScroller<RadListDataItem> scroller)
Parameters
ItemScroller<RadListDataItem>
scroller
|
Overrides
IsIndexValid(Int32)
Determines whether the provided index is in the range [0, Items.Count)
Declaration
protected bool IsIndexValid(int value)
Parameters
System.Int32
value
The index to validate. |
Returns
System.Boolean
Returns true if the index is inside [0, Items.Count) and false otherwise. |
IsItemPartiallyVisible(RadListVisualItem)
Determines if the provided visual item intersects the view but is not contained in it.
Declaration
protected bool IsItemPartiallyVisible(RadListVisualItem item)
Parameters
RadListVisualItem
item
|
Returns
System.Boolean
|
ItemFullyVisible(RadListDataItem)
This method returns true if the ActiveItem is fully visible.
Declaration
protected bool ItemFullyVisible(RadListDataItem item)
Parameters
RadListDataItem
item
|
Returns
System.Boolean
|
OnActiveItemAdded(RadListDataItem)
Declaration
protected virtual void OnActiveItemAdded(RadListDataItem newItem)
Parameters
RadListDataItem
newItem
|
OnBoundsChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnBoundsChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
|
Overrides
OnBubbleEvent(RadElement, RoutedEventArgs)
Declaration
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
Parameters
RadElement
sender
|
RoutedEventArgs
args
|
Overrides
OnControlMouseDown(MouseEventArgs)
Declaration
public virtual bool OnControlMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Returns
System.Boolean
|
OnControlMouseMove(MouseEventArgs)
Declaration
public virtual bool OnControlMouseMove(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Returns
System.Boolean
|
OnControlMouseUp(MouseEventArgs)
Declaration
public virtual bool OnControlMouseUp(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Returns
System.Boolean
|
OnCreatingVisualListItem(RadListDataItem, RadListVisualItem)
Fires the CreatingVisualItem event.
Declaration
protected virtual RadListVisualItem OnCreatingVisualListItem(RadListDataItem dataItem, RadListVisualItem item)
Parameters
RadListDataItem
dataItem
|
RadListVisualItem
item
|
Returns
RadListVisualItem
|
OnCreatingVisualListItem(RadListVisualItem)
Fires the CreatingVisualItem event.
Declaration
protected virtual RadListVisualItem OnCreatingVisualListItem(RadListVisualItem item)
Parameters
RadListVisualItem
item
|
Returns
RadListVisualItem
|
OnDataBindingComplete(Object, ListBindingCompleteEventArgs)
Raises the DataBindingComplete event.
Declaration
protected virtual void OnDataBindingComplete(object sender, ListBindingCompleteEventArgs e)
Parameters
System.Object
sender
|
ListBindingCompleteEventArgs
e
An ListBindingCompleteEventArgs instance that contains the event data. |
See Also
OnDataItemPropertyChanged(Object, RadPropertyChangedEventArgs)
Raises the DataItemPropertyChanged
Declaration
protected virtual void OnDataItemPropertyChanged(object sender, RadPropertyChangedEventArgs args)
Parameters
System.Object
sender
|
RadPropertyChangedEventArgs
args
|
OnItemsChanged(NotifyCollectionChangedEventArgs)
Raises the ItemsChanged event with the provided arguments.
Declaration
protected virtual void OnItemsChanged(NotifyCollectionChangedEventArgs args)
Parameters
NotifyCollectionChangedEventArgs
args
The arguments that contain the data relevant to the items change. |
OnItemsChanging(NotifyCollectionChangingEventArgs)
Raises the ItemsChanging event with the provided arguments.
Declaration
protected virtual void OnItemsChanging(NotifyCollectionChangingEventArgs args)
Parameters
NotifyCollectionChangingEventArgs
args
The arguments that contain the data relevant to the pending items change. |
OnListItemDataBinding()
Fires the ItemDataBinding event.
Declaration
protected virtual RadListDataItem OnListItemDataBinding()
Returns
RadListDataItem
|
OnListItemDataBound(RadListDataItem)
Fires the ItemDataBound event.
Declaration
protected virtual void OnListItemDataBound(RadListDataItem newItem)
Parameters
RadListDataItem
newItem
|
OnLoaded()
OnMouseDown(MouseEventArgs)
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Overrides
OnMouseWheel(Int32)
Performs scrolling logic depending on the delta from the mouse wheel.
Declaration
protected virtual void OnMouseWheel(int delta)
Parameters
System.Int32
delta
|
OnPanGesture(PanGestureEventArgs)
Declaration
protected override void OnPanGesture(PanGestureEventArgs args)
Parameters
PanGestureEventArgs
args
|
Overrides
OnPropertyChanged(RadPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Parameters
RadPropertyChangedEventArgs
e
|
Overrides
OnSelectedIndexChanged(Int32)
Fires the SelectedIndexChanged event.
Declaration
protected virtual void OnSelectedIndexChanged(int newIndex)
Parameters
System.Int32
newIndex
|
OnSelectedIndexChanging(Int32)
Fires the SelectedIndexChanging event.
Declaration
protected virtual bool OnSelectedIndexChanging(int newIndex)
Parameters
System.Int32
newIndex
|
Returns
System.Boolean
|
OnSelectedItemAdded(RadListDataItem)
Declaration
protected virtual void OnSelectedItemAdded(RadListDataItem newItem)
Parameters
RadListDataItem
newItem
|
OnSelectedValueChanged(Int32)
Fires the SelectedValueChanged event if SelectedValue has actually changed since many items can have the same value.
Declaration
protected virtual void OnSelectedValueChanged(int newIndex)
Parameters
System.Int32
newIndex
|
OnSortStyleChanged(SortStyle)
Fires the SortStyleChanged event.
Declaration
protected virtual void OnSortStyleChanged(SortStyle sortStyle)
Parameters
SortStyle
sortStyle
|
OnVisualItemFormatting(RadListVisualItem)
Fires the VisualItemFormattingeEvent with the provided visual item.
Declaration
protected virtual void OnVisualItemFormatting(RadListVisualItem item)
Parameters
RadListVisualItem
item
|
ProcessKeyboardSearch(Char)
Finds an item with the text provided by an internal search buffer after the character argument is appended to the buffer. The search buffer is reset after a user defined time since the last character was typed. By default this is 300 ms. Users can set the KeyboardSearchResetInterval property to a custom interval.
Declaration
protected virtual void ProcessKeyboardSearch(char character)
Parameters
System.Char
character
A character that will be appended to the search buffer. |
Rebind()
Forces re-evaluation of the current data source (if any).
Declaration
public void Rebind()
ScrollByPage(Int32)
Declaration
public void ScrollByPage(int pageCount)
Parameters
System.Int32
pageCount
|
scroller_ScrollerUpdated(Object, EventArgs)
Declaration
protected override void scroller_ScrollerUpdated(object sender, EventArgs e)
Parameters
System.Object
sender
|
System.EventArgs
e
|
Overrides
ScrollToActiveItem()
Scrolls to the active item if it is not null and if it is not fully visible.
Declaration
public void ScrollToActiveItem()
ScrollToItem(RadListDataItem)
Scrolls to the provided item so that the item will appear at the top of the view if it is before the currently visible items and at the bottom of the view if it is after the currently visible items.
Declaration
public void ScrollToItem(RadListDataItem item)
Parameters
RadListDataItem
item
The item to scroll to. |
SelectAll()
Selects all items if the SelectionMode allows it.
Declaration
public void SelectAll()
Exceptions
System.InvalidOperationException
Selecting all items is not a valid operation in the current selection mode. SelectionMode = + this.selectionMode.ToString() + . |
SelectRange(Int32, Int32)
Clears the currently selected items and selects all items in the closed range [startIndex, endIndex].
Declaration
public void SelectRange(int startIndex, int endIndex)
Parameters
System.Int32
startIndex
The first index at which to start selecting items. |
System.Int32
endIndex
The index of one item past the last one to be selected. |
SetSelectedIndex(Int32)
Sets the selected index to the specified value if it is different than the current value and fires the selection events. This method triggers selection events.
Declaration
protected virtual void SetSelectedIndex(int value)
Parameters
System.Int32
value
|
SetSelectedItem(RadListDataItem)
Sets the selected data item to the specified item. If the item is different than the current one the selection events will be fired. This method triggers selection events.
Declaration
protected void SetSelectedItem(RadListDataItem value)
Parameters
RadListDataItem
value
|
SetSelectedItemCore(RadListDataItem)
Declaration
protected virtual void SetSelectedItemCore(RadListDataItem item)
Parameters
RadListDataItem
item
|
SetSelectedValue(Object)
Sets the SelectedItem and thus SelectedIndex to the logical item with the specified value. If there are many items with the same value the first item found will be selected. This method triggers selection events.
Declaration
protected virtual void SetSelectedValue(object value)
Parameters
System.Object
value
The value for which to find an item. |
SynchronizeVisualItems()
Syncronizes the properties of all visual elements with their data items.
Declaration
protected virtual void SynchronizeVisualItems()
UnwireEvents()
Declaration
protected override void UnwireEvents()
Overrides
UpdateActiveItem(RadListDataItem, Boolean)
This method sets the provided item as active and the previous one to inactive. There can be only active item at a time.
Declaration
protected virtual void UpdateActiveItem(RadListDataItem item, bool active)
Parameters
RadListDataItem
item
The item to set to an active state. |
System.Boolean
active
The value to which the Active property of item will be set. |
UpdateItemTraverser()
Creates a new item traverser and updates the current. If group refresh is suspended this method has no effect.
Declaration
protected void UpdateItemTraverser()
WireEvents()
Declaration
protected override void WireEvents()
Overrides
Events
CreatingVisualItem
This event fires while creating visual items. This happens on during initial layout and during resizing if the new size is larger and thus allowing more items to be visualized. The event provides a means to create a custom visual item.
Declaration
public event CreatingVisualListItemEventHandler CreatingVisualItem
Event Type
CreatingVisualListItemEventHandler
|
DataBindingComplete
Fires after data binding operation has finished.
Declaration
public event ListBindingCompleteEventHandler DataBindingComplete
Event Type
ListBindingCompleteEventHandler
|
See Also
DataItemPropertyChanged
This event fires whenever a RadProperty of a data item changes. This event is most often used to listen changes in Selected and Active properties of the data items.
Declaration
public event RadPropertyChangedEventHandler DataItemPropertyChanged
Event Type
RadPropertyChangedEventHandler
|
ItemDataBinding
This item fires for data item that is being created during data binding and fires before the ItemDataBound event. The event provides a means for changing the instance of the data item to a custom data item.
Declaration
public event ListItemDataBindingEventHandler ItemDataBinding
Event Type
ListItemDataBindingEventHandler
|
ItemDataBound
This event fires after a data item has been created and bound.
Declaration
public event ListItemDataBoundEventHandler ItemDataBound
Event Type
ListItemDataBoundEventHandler
|
ItemsChanged
This event fires whenever an item is added, removed, set or if the whole items collection was modified.
Declaration
public event NotifyCollectionChangedEventHandler ItemsChanged
Event Type
NotifyCollectionChangedEventHandler
|
ItemsChanging
This event fires right before adding, removing or setting an item. This event will not fire if an item is added to a data source directly because there is no way for RadListElement to be notified before the change.
Declaration
public event NotifyCollectionChangingEventHandler ItemsChanging
Event Type
NotifyCollectionChangingEventHandler
|
SelectedIndexChanged
This event fires when selected index changes. This always happens when the SelectedItem changes.
Declaration
public event PositionChangedEventHandler SelectedIndexChanged
Event Type
PositionChangedEventHandler
|
SelectedIndexChanging
This event fires before SelectedIndexChanged and provides a means for cancelling the whole selection operation. Someties this event will not fire since cancelling the change is not possible, for example when the DataSource is set to null.
Declaration
public event PositionChangingEventHandler SelectedIndexChanging
Event Type
PositionChangingEventHandler
|
SelectedItemsChanged
Declaration
public event NotifyCollectionChangedEventHandler SelectedItemsChanged
Event Type
NotifyCollectionChangedEventHandler
|
SelectedItemsChanging
Declaration
public event NotifyCollectionChangingEventHandler SelectedItemsChanging
Event Type
NotifyCollectionChangingEventHandler
|
SelectedValueChanged
This event fires when the SelectedValue changes. This is will not always fire when the SelectedItem or SelectedIndex changes because the new item may have the same value.
Declaration
public event EventHandler SelectedValueChanged
Event Type
System.EventHandler
|
SortStyleChanged
This event fires after the sorting style changes.
Declaration
public event SortStyleChangedEventHandler SortStyleChanged
Event Type
SortStyleChangedEventHandler
|
VisualItemFormatting
The visual item formatting fires whenever the state of a visible logical item changes and when scrolling.
Declaration
public event VisualListItemFormattingEventHandler VisualItemFormatting
Event Type
VisualListItemFormattingEventHandler
|