skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI UI for Xamarin

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility and Security
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadListSource<TDataItem>

Inheritance
System.Object
RadListSource<TDataItem>
GridViewListSource
ListControlListSource
ListViewListSource
TreeMapListSource
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.WinControls.Data
Assembly: Telerik.WinControls.dll

Syntax

public class RadListSource<TDataItem> : IList<TDataItem>, ICollection<TDataItem>, IEnumerable<TDataItem>, IList, ICollection, IEnumerable, ITypedList, ICancelAddNew, INotifyCollectionChanged, INotifyPropertyChanged, ICurrencyManagerProvider, IDisposable where TDataItem : IDataItem
Type Parameters
TDataItem

Constructors

RadListSource()

Declaration
public RadListSource()

RadListSource(IDataItemSource)

Declaration
public RadListSource(IDataItemSource source)
Parameters
IDataItemSource source

RadListSource(IDataItemSource, RadCollectionView<TDataItem>)

Declaration
public RadListSource(IDataItemSource source, RadCollectionView<TDataItem> collectionView)
Parameters
IDataItemSource source

RadCollectionView<TDataItem> collectionView

Properties

BoundProperties

Declaration
public PropertyDescriptorCollection BoundProperties { get; }
Property Value
System.ComponentModel.PropertyDescriptorCollection

CollectionView

Gets the collection view.

Declaration
public RadCollectionView<TDataItem> CollectionView { get; }
Property Value
RadCollectionView<TDataItem>

The collection view.

Count

Declaration
public int Count { get; }
Property Value
System.Int32

Implements
System.Collections.Generic.ICollection<T>.Count
System.Collections.ICollection.Count

CreateATransactionForEveryValueSetting

Gets or sets a value indicating whether each value setting should be encapsulaed in its own BeginEdit EndEditTransaction.

Declaration
public bool CreateATransactionForEveryValueSetting { get; set; }
Property Value
System.Boolean

Current

Gets the current.

Declaration
public TDataItem Current { get; }
Property Value
TDataItem

The current.

DataMember

Gets or sets the name of the list or table in the data source for which the RadListSource<TDataItem> is bound.

Declaration
public string DataMember { get; set; }
Property Value
System.String

DataSource

Gets or sets the data source of the RadListSource<TDataItem>.

Declaration
public object DataSource { get; set; }
Property Value
System.Object

IsDataBound

Gets a value indicating whether this instance is data bound.

Declaration
public bool IsDataBound { get; }
Property Value
System.Boolean

true if this instance is data bound; otherwise, false.

IsReadOnly

Gets a value indicating whether the System.Collections.Generic.ICollection<T> is read-only.

Declaration
public bool IsReadOnly { get; }
Property Value
System.Boolean

Implements
System.Collections.Generic.ICollection<T>.IsReadOnly
System.Collections.IList.IsReadOnly

IsUpdating

Determines whether this instance is in a Begin/End update block.

Declaration
public bool IsUpdating { get; }
Property Value
System.Boolean

Item[Int32]

Gets or sets the item at the specified index.

Declaration
public TDataItem this[int index] { get; set; }
Parameters
System.Int32 index

Property Value
TDataItem

Implements
System.Collections.Generic.IList<T>.Item[System.Int32]

Items

Declaration
protected List<TDataItem> Items { get; set; }
Property Value
System.Collections.Generic.List<TDataItem>

Position

Gets or sets the position.

Declaration
public int Position { get; set; }
Property Value
System.Int32

The position.

UseCaseSensitiveFieldNames

Declaration
public bool UseCaseSensitiveFieldNames { get; set; }
Property Value
System.Boolean

Methods

Add(TDataItem)

Adds an item to the System.Collections.Generic.ICollection<T>.

Declaration
public void Add(TDataItem item)
Parameters
TDataItem item

The object to add to the System.Collections.Generic.ICollection<T>.

Implements
System.Collections.Generic.ICollection<T>.Add(T)
Exceptions
System.NotSupportedException

The System.Collections.Generic.ICollection<T> is read-only.

AddNew()

Adds the new.

Declaration
public virtual TDataItem AddNew()
Returns
TDataItem

AddNew(TDataItem)

Adds the created item to ListSource.

Declaration
public virtual TDataItem AddNew(TDataItem item)
Parameters
TDataItem item

Returns
TDataItem

AddUnboundInternal(TDataItem)

Used internally by the design time property editor.

Declaration
public void AddUnboundInternal(TDataItem item)
Parameters
TDataItem item

BeginUpdate()

Begins the update.

Declaration
public void BeginUpdate()

ChangeItem(Int32, TDataItem, String)

Declaration
protected virtual void ChangeItem(int index, TDataItem item, string propertyName)
Parameters
System.Int32 index

TDataItem item

System.String propertyName

Clear()

Removes all items from the System.Collections.Generic.ICollection<T>.

Declaration
public void Clear()
Implements
System.Collections.Generic.ICollection<T>.Clear()
System.Collections.IList.Clear()
Exceptions
System.NotSupportedException

The System.Collections.Generic.ICollection<T> is read-only.

ClearItems()

Declaration
protected virtual void ClearItems()

ClearItemsCore()

Declaration
protected virtual void ClearItemsCore()

Contains(TDataItem)

Determines whether the System.Collections.Generic.ICollection<T> contains a specific value.

Declaration
public bool Contains(TDataItem item)
Parameters
TDataItem item

The object to locate in the System.Collections.Generic.ICollection<T>.

Returns
System.Boolean

true if item is found in the System.Collections.Generic.ICollection<T>; otherwise, false.

Implements
System.Collections.Generic.ICollection<T>.Contains(T)

CopyTo(TDataItem[], Int32)

Copies the elements of the System.Collections.Generic.ICollection<T> to an System.Array, starting at a particular System.Array index.

Declaration
public void CopyTo(TDataItem[] array, int arrayIndex)
Parameters
TDataItem[] array

The one-dimensional System.Array that is the destination of the elements copied from System.Collections.Generic.ICollection<T>. The System.Array must have zero-based indexing.

System.Int32 arrayIndex

The zero-based index in array at which copying begins.

Implements
System.Collections.Generic.ICollection<T>.CopyTo(T[], System.Int32)
Exceptions
System.ArgumentNullException

array is null.

System.ArgumentOutOfRangeException

arrayIndex is less than 0.

System.ArgumentException

array is multidimensional. -or- arrayIndex is equal to or greater than the length of array. -or- The number of elements in the source System.Collections.Generic.ICollection<T> is greater than the available space from arrayIndex to the end of the destination array. -or- Type T cannot be cast automatically to the type of the destination array.

CreateDefaultCollectionView()

Declaration
protected virtual RadCollectionView<TDataItem> CreateDefaultCollectionView()
Returns
RadCollectionView<TDataItem>

Dispose()

Declaration
public void Dispose()
Implements
System.IDisposable.Dispose()

EndUpdate()

Ends the update.

Declaration
public void EndUpdate()

EndUpdate(Boolean)

Ends the update.

Declaration
public void EndUpdate(bool notifyUpdates)
Parameters
System.Boolean notifyUpdates

if set to true [notify updates].

GetBoundValue(Object, String)

Declaration
public object GetBoundValue(object dataBoundItem, string propertyName)
Parameters
System.Object dataBoundItem

System.String propertyName

Returns
System.Object

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public IEnumerator<TDataItem> GetEnumerator()
Returns
System.Collections.Generic.IEnumerator<TDataItem>

A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection.

Implements
System.Collections.Generic.IEnumerable<T>.GetEnumerator()

GetItemProperties(PropertyDescriptor[])

Returns the System.ComponentModel.PropertyDescriptorCollection that represents the properties on each item used to bind data.

Declaration
public PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors)
Parameters
System.ComponentModel.PropertyDescriptor[] listAccessors

An array of System.ComponentModel.PropertyDescriptor objects to find in the collection as bindable. This can be null.

Returns
System.ComponentModel.PropertyDescriptorCollection

The System.ComponentModel.PropertyDescriptorCollection that represents the properties on each item used to bind data.

GetListName(PropertyDescriptor[])

Returns the name of the list.

Declaration
public string GetListName(PropertyDescriptor[] listAccessors)
Parameters
System.ComponentModel.PropertyDescriptor[] listAccessors

An array of System.ComponentModel.PropertyDescriptor objects, for which the list name is returned. This can be null.

Returns
System.String

The name of the list.

IndexOf(TDataItem)

Determines the index of a specific item in the System.Collections.Generic.IList<T>.

Declaration
public int IndexOf(TDataItem item)
Parameters
TDataItem item

The object to locate in the System.Collections.Generic.IList<T>.

Returns
System.Int32

The index of item if found in the list; otherwise, -1.

Implements
System.Collections.Generic.IList<T>.IndexOf(T)

InitializeBoundRow(TDataItem, Object)

Declaration
protected virtual void InitializeBoundRow(TDataItem item, object dataBoundItem)
Parameters
TDataItem item

System.Object dataBoundItem

Insert(Int32, TDataItem)

Inserts an item to the System.Collections.Generic.IList<T> at the specified index.

Declaration
public void Insert(int index, TDataItem item)
Parameters
System.Int32 index

The zero-based index at which item should be inserted.

TDataItem item

The object to insert into the System.Collections.Generic.IList<T>.

Implements
System.Collections.Generic.IList<T>.Insert(System.Int32, T)
Exceptions
System.ArgumentOutOfRangeException

index is not a valid index in the System.Collections.Generic.IList<T>.

System.NotSupportedException

The System.Collections.Generic.IList<T> is read-only.

InsertItem(Int32, TDataItem)

Declaration
protected virtual void InsertItem(int index, TDataItem item)
Parameters
System.Int32 index

TDataItem item

Move(Int32, Int32)

Moves the specified item.

Declaration
public void Move(int oldIndex, int newIndex)
Parameters
System.Int32 oldIndex

The old index.

System.Int32 newIndex

The new index.

MoveItem(Int32, Int32)

Declaration
protected virtual void MoveItem(int oldIndex, int newIndex)
Parameters
System.Int32 oldIndex

System.Int32 newIndex

NotifyItemChanged(TDataItem)

Raises a CollectionChanged notification with action ItemChanged. Must be paired with the NotifyItemChanging method.

Declaration
public void NotifyItemChanged(TDataItem item)
Parameters
TDataItem item

NotifyItemChanged(TDataItem, String)

Raises a CollectionChanged notification with action ItemChanged. Must be paired with the NotifyItemChanging method.

Declaration
public void NotifyItemChanged(TDataItem item, string propertyName)
Parameters
TDataItem item

System.String propertyName

NotifyItemChanging(TDataItem)

Raises a CollectionChanged notification with action ItemChanging. Must be paired with the NotifyItemChanged method.

Declaration
public void NotifyItemChanging(TDataItem item)
Parameters
TDataItem item

NotifyItemChanging(TDataItem, String)

Raises a CollectionChanged notification with action ItemChanging. Must be paired with the NotifyItemChanged method.

Declaration
public void NotifyItemChanging(TDataItem item, string propertyName)
Parameters
TDataItem item

System.String propertyName

OnCollectionChanged(NotifyCollectionChangedEventArgs)

Declaration
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
Parameters
NotifyCollectionChangedEventArgs e

OnNotifyPropertyChanged(PropertyChangedEventArgs)

Raises the NotifyPropertyChanged event

Declaration
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters
System.ComponentModel.PropertyChangedEventArgs e

OnNotifyPropertyChanged(String)

Raises the PropertyChanged event

Declaration
protected virtual void OnNotifyPropertyChanged(string propertyName)
Parameters
System.String propertyName

The name of the property

ProcessCurrencyManagerListChanged(Object, ListChangedEventArgs)

Declaration
protected virtual void ProcessCurrencyManagerListChanged(object sender, ListChangedEventArgs e)
Parameters
System.Object sender

System.ComponentModel.ListChangedEventArgs e

Refresh()

Refreshes this instance.

Declaration
public virtual void Refresh()

Remove(TDataItem)

Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection<T>.

Declaration
public bool Remove(TDataItem item)
Parameters
TDataItem item

The object to remove from the System.Collections.Generic.ICollection<T>.

Returns
System.Boolean

true if item was successfully removed from the System.Collections.Generic.ICollection<T>; otherwise, false. This method also returns false if item is not found in the original System.Collections.Generic.ICollection<T>.

Implements
System.Collections.Generic.ICollection<T>.Remove(T)
Exceptions
System.NotSupportedException

The System.Collections.Generic.ICollection<T> is read-only.

RemoveAt(Int32)

Removes the System.Collections.Generic.IList<T> item at the specified index.

Declaration
public void RemoveAt(int index)
Parameters
System.Int32 index

The zero-based index of the item to remove.

Implements
System.Collections.Generic.IList<T>.RemoveAt(System.Int32)
System.Collections.IList.RemoveAt(System.Int32)
Exceptions
System.ArgumentOutOfRangeException

index is not a valid index in the System.Collections.Generic.IList<T>.

System.NotSupportedException

The System.Collections.Generic.IList<T> is read-only.

RemoveItem(Int32)

Declaration
protected virtual void RemoveItem(int index)
Parameters
System.Int32 index

Reset()

Resets this instance.

Declaration
public virtual void Reset()

SetBoundValue(IDataItem, String, Object)

Declaration
public bool SetBoundValue(IDataItem dataItem, string propertyName, object value)
Parameters
IDataItem dataItem

System.String propertyName

System.Object value

Returns
System.Boolean

SetBoundValue(IDataItem, String, Object, String)

Declaration
public bool SetBoundValue(IDataItem dataItem, string propertyName, object value, string path)
Parameters
IDataItem dataItem

System.String propertyName

System.Object value

System.String path

Returns
System.Boolean

SetBoundValue(IDataItem, String, String, Object, String)

Declaration
public bool SetBoundValue(IDataItem dataItem, string propertyName, string columnName, object value, string path)
Parameters
IDataItem dataItem

System.String propertyName

System.String columnName

System.Object value

System.String path

Returns
System.Boolean

SetItem(Int32, TDataItem)

Declaration
protected virtual void SetItem(int index, TDataItem item)
Parameters
System.Int32 index

TDataItem item

UnWireEvents()

Declaration
protected virtual void UnWireEvents()

WireEvents()

Declaration
protected virtual void WireEvents()

Events

CollectionChanged

Declaration
public event NotifyCollectionChangedEventHandler CollectionChanged
Event Type
NotifyCollectionChangedEventHandler

Implements
INotifyCollectionChanged.CollectionChanged

PositionChanged

Declaration
public event EventHandler PositionChanged
Event Type
System.EventHandler

PropertyChanged

Occurs when a property value changes.

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler

Explicit Interface Implementations

ICollection.CopyTo(Array, Int32)

Declaration
void ICollection.CopyTo(Array array, int index)
Parameters
System.Array array

System.Int32 index

Implements
System.Collections.ICollection.CopyTo(System.Array, System.Int32)

ICollection.IsSynchronized

Declaration
bool ICollection.IsSynchronized { get; }
Returns
System.Boolean

Implements
System.Collections.ICollection.IsSynchronized

ICollection.SyncRoot

Declaration
object ICollection.SyncRoot { get; }
Returns
System.Object

Implements
System.Collections.ICollection.SyncRoot

IEnumerable.GetEnumerator()

Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
System.Collections.IEnumerator

Implements
System.Collections.IEnumerable.GetEnumerator()

IList.Add(Object)

Declaration
int IList.Add(object value)
Parameters
System.Object value

Returns
System.Int32

Implements
System.Collections.IList.Add(System.Object)

IList.Contains(Object)

Declaration
bool IList.Contains(object value)
Parameters
System.Object value

Returns
System.Boolean

Implements
System.Collections.IList.Contains(System.Object)

IList.get_Item(Int32)

Declaration
object IList.get_Item(int index)
Parameters
System.Int32 index

Returns
System.Object

Implements
System.Collections.IList.get_Item(System.Int32)

IList.IndexOf(Object)

Declaration
int IList.IndexOf(object value)
Parameters
System.Object value

Returns
System.Int32

Implements
System.Collections.IList.IndexOf(System.Object)

IList.Insert(Int32, Object)

Declaration
void IList.Insert(int index, object value)
Parameters
System.Int32 index

System.Object value

Implements
System.Collections.IList.Insert(System.Int32, System.Object)

IList.IsFixedSize

Declaration
bool IList.IsFixedSize { get; }
Returns
System.Boolean

Implements
System.Collections.IList.IsFixedSize

IList.Item[Int32]

Declaration
object IList.this[] { get; set; }
Parameters
System.Int32 index

Returns
System.Object

Implements
System.Collections.IList.Item[System.Int32]

IList.Remove(Object)

Declaration
void IList.Remove(object value)
Parameters
System.Object value

Implements
System.Collections.IList.Remove(System.Object)

IList.set_Item(Int32, Object)

Declaration
void IList.set_Item(int index, object value)
Parameters
System.Int32 index

System.Object value

Implements
System.Collections.IList.set_Item(System.Int32, System.Object)

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.