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:
public class ListViewColumnCollection : ObservableCollection<ListViewDetailColumn>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyCollectionChanging, INotifyPropertyChanged, INotifyPropertyChangingEx
Inheritance: objectCollection<ListViewDetailColumn>ObservableCollection<ListViewDetailColumn>ListViewColumnCollection
Implements:
Inherited Members
Constructors
Creates a column collection associated with the specified list view element.
public ListViewColumnCollection(RadListViewElement owner)
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.
public bool AllowCaseSensitiveNames { get; set; }
The current column names collide under the requested case-sensitivity setting.
Gets the list view element that owns this collection.
public RadListViewElement Owner { get; }
The owning element.
Methods
Creates a column whose name and header text are both set to the specified value.
Adds the specified columns while collection notifications are suspended.
public virtual void AddRange(params ListViewDetailColumn[] listViewColumns)
The columns to add.
Delegates clearing to the base collection, then clears the name lookup index.
protected override void ClearItems()
Overrides:
Registers the column name and owner before delegating insertion to the base collection. The base operation can be canceled by a collection-changing handler.
protected override void InsertItem(int index, ListViewDetailColumn column, Action<ListViewDetailColumn> approvedAction)
The requested insertion position.
columnListViewDetailColumnThe column being inserted.
approvedActionAction<ListViewDetailColumn>The action the base collection invokes after approving the change.
Overrides:
Removes the named column if it is present in the collection.
public void Remove(string columnName)
The name of the column to remove.
Delegates removal to the base collection, then removes the column's name from the lookup index.
protected override void RemoveItem(int index)
The position of the column to remove.
Overrides:
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.
public void Rename(string name, string newName)
The current name-index key.
newNamestringThe replacement name-index key.
Exceptions: ArgumentExceptionAnother column already uses newName as its name-index key.