New to Telerik UI for WinForms? Start a free 30-day trial

Stores the columns used by a list view's Details view and provides name-based lookup. Added columns are assigned to the owning element, and name comparisons follow AllowCaseSensitiveNames.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class ListViewColumnCollection : ObservableCollection<ListViewDetailColumn>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyCollectionChanging, INotifyPropertyChanged, INotifyPropertyChangingEx

Inheritance: objectCollection<ListViewDetailColumn>ObservableCollection<ListViewDetailColumn>ListViewColumnCollection

Implements: ICollectionIEnumerableIListINotifyCollectionChangedINotifyCollectionChangingINotifyPropertyChangedINotifyPropertyChangingEx...

Inherited Members ObservableCollection<ListViewDetailColumn>.CountStringObservableCollection<ListViewDetailColumn>.ItemArrayStringObservableCollection<ListViewDetailColumn>.InsertItem(int, ListViewDetailColumn)ObservableCollection<ListViewDetailColumn>.Move(int, int)ObservableCollection<ListViewDetailColumn>.MoveItem(int, int)ObservableCollection<ListViewDetailColumn>.BeginUpdate()ObservableCollection<ListViewDetailColumn>.BeginItemUpdate()ObservableCollection<ListViewDetailColumn>.EndItemUpdate()ObservableCollection<ListViewDetailColumn>.EndItemUpdate(bool)ObservableCollection<ListViewDetailColumn>.EndUpdate(bool)ObservableCollection<ListViewDetailColumn>.EndUpdate()ObservableCollection<ListViewDetailColumn>.OnCollectionChanged(NotifyCollectionChangedEventArgs)ObservableCollection<ListViewDetailColumn>.NotifyListenersCollectionChanged(NotifyCollectionChangedEventArgs)ObservableCollection<ListViewDetailColumn>.CallCollectionChanged(object, NotifyCollectionChangedEventArgs)ObservableCollection<ListViewDetailColumn>.OnCollectionChanging(NotifyCollectionChangingEventArgs)ObservableCollection<ListViewDetailColumn>.NotifyListenersCollectionChanging(NotifyCollectionChangingEventArgs)ObservableCollection<ListViewDetailColumn>.CallCollectionChanging(object, NotifyCollectionChangingEventArgs)ObservableCollection<ListViewDetailColumn>.SetItem(int, ListViewDetailColumn)ObservableCollection<ListViewDetailColumn>.AddRange(IEnumerable<ListViewDetailColumn>)ObservableCollection<ListViewDetailColumn>.RemoveRange(IEnumerable<ListViewDetailColumn>)ObservableCollection<ListViewDetailColumn>.OnCollectionChanged(NotifyCollectionChangedAction, object, int)ObservableCollection<ListViewDetailColumn>.OnCollectionChanged(NotifyCollectionChangedAction, object, int, int)ObservableCollection<ListViewDetailColumn>.OnCollectionChanged(NotifyCollectionChangedAction, object, object, int)ObservableCollection<ListViewDetailColumn>.OnCollectionReset(IList)ObservableCollection<ListViewDetailColumn>.OnCollectionChanging(NotifyCollectionChangedAction, object, int)ObservableCollection<ListViewDetailColumn>.OnCollectionChanging(NotifyCollectionChangedAction, object, int, int)ObservableCollection<ListViewDetailColumn>.OnCollectionChanging(NotifyCollectionChangedAction, object, object, int)ObservableCollection<ListViewDetailColumn>.OnCollectionReseting()ObservableCollection<ListViewDetailColumn>.OnNotifyPropertyChanged(string)ObservableCollection<ListViewDetailColumn>.OnNotifyPropertyChanged(PropertyChangedEventArgs)ObservableCollection<ListViewDetailColumn>.OnNotifyPropertyChanging(string)ObservableCollection<ListViewDetailColumn>.OnNotifyPropertyChanging(PropertyChangingEventArgsEx)ObservableCollection<ListViewDetailColumn>.IsUpdatedObservableCollection<ListViewDetailColumn>.CollectionChangedObservableCollection<ListViewDetailColumn>.CollectionChangingObservableCollection<ListViewDetailColumn>.PropertyChangedObservableCollection<ListViewDetailColumn>.PropertyChangingCollection<ListViewDetailColumn>.Add(ListViewDetailColumn)Collection<ListViewDetailColumn>.Clear()Collection<ListViewDetailColumn>.CopyTo(ListViewDetailColumn[], int)Collection<ListViewDetailColumn>.Contains(ListViewDetailColumn)Collection<ListViewDetailColumn>.GetEnumerator()Collection<ListViewDetailColumn>.IndexOf(ListViewDetailColumn)Collection<ListViewDetailColumn>.Insert(int, ListViewDetailColumn)Collection<ListViewDetailColumn>.Remove(ListViewDetailColumn)Collection<ListViewDetailColumn>.RemoveAt(int)Collection<ListViewDetailColumn>.CountCollection<ListViewDetailColumn>.ItemsCollection<ListViewDetailColumn>.this[int]...

Constructors

Creates a column collection associated with the specified list view element.

C#
public ListViewColumnCollection(RadListViewElement owner)
Parameters:ownerRadListViewElement

The element that owns the columns.

Properties

Gets or sets whether name-based column lookup distinguishes letter casing. Changing this setting rebuilds the collection's name index.

C#
public bool AllowCaseSensitiveNames { get; set; }
Exceptions: ArgumentException

The current column names collide under the requested case-sensitivity setting.

Gets the list view element that owns this collection.

C#
public RadListViewElement Owner { get; }
Property Value:

The owning element.

Gets a column by its name using the collection's current case-sensitivity setting.

C#
public ListViewDetailColumn this[string columnName] { get; }
Parameters:columnNamestring

The name used to find the column.

Property Value:

The matching column, or null if no name matches.

Methods

Creates a column with the specified name and displayed header text.

C#
public void Add(string name, string headerText)
Parameters:namestring

The name used to identify the column in this collection.

headerTextstring

The text displayed in the column header.

Creates a column whose name and header text are both set to the specified value.

C#
public void Add(string name)
Parameters:namestring

The column name and displayed header text.

Adds the specified columns while collection notifications are suspended.

C#
public virtual void AddRange(params ListViewDetailColumn[] listViewColumns)
Parameters:listViewColumnsListViewDetailColumn[]

The columns to add.

Delegates clearing to the base collection, then clears the name lookup index.

C#
protected override void ClearItems()

Overrides: ObservableCollection<ListViewDetailColumn>.ClearItems()

Determines whether the collection contains a column with the specified name. An empty or null name is not considered present.

C#
public bool Contains(string columnName)
Parameters:columnNamestring

The name to search for.

Returns:

bool

true if a matching column exists; otherwise, false.

Finds the position of a column by name using the configured case-sensitivity setting.

C#
public int IndexOf(string columnName)
Parameters:columnNamestring

The name to search for.

Returns:

int

The zero-based position, or -1 if no column has that name.

Registers the column name and owner before delegating insertion to the base collection. The base operation can be canceled by a collection-changing handler.

C#
protected override void InsertItem(int index, ListViewDetailColumn column, Action<ListViewDetailColumn> approvedAction)
Parameters:indexint

The requested insertion position.

columnListViewDetailColumn

The column being inserted.

approvedActionAction<ListViewDetailColumn>

The action the base collection invokes after approving the change.

Overrides: ObservableCollection<ListViewDetailColumn>.InsertItem(int, ListViewDetailColumn, Action<ListViewDetailColumn>)

Removes the named column if it is present in the collection.

C#
public void Remove(string columnName)
Parameters:columnNamestring

The name of the column to remove.

Delegates removal to the base collection, then removes the column's name from the lookup index.

C#
protected override void RemoveItem(int index)
Parameters:indexint

The position of the column to remove.

Overrides: ObservableCollection<ListViewDetailColumn>.RemoveItem(int)

Changes the name-index key for a column and updates a matching filter descriptor's PropertyName. This does not change the column object's Name property; if the old name is not indexed, nothing changes.

C#
public void Rename(string name, string newName)
Parameters:namestring

The current name-index key.

newNamestring

The replacement name-index key.

Exceptions: ArgumentException

Another column already uses newName as its name-index key.