New to Telerik UI for WinFormsStart a free 30-day trial

A collection of GridViewColumn objects

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.GridView.dll

Syntax:

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

Inheritance: objectCollection<GridViewDataColumn>ObservableCollection<GridViewDataColumn>GridViewColumnCollection

Implements: ICollectionIEnumerableIListINotifyCollectionChangedINotifyCollectionChangingINotifyPropertyChangedINotifyPropertyChangingEx...

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

Constructors

Initializes a new instance of the GridViewColumnCollection class.

C#
public GridViewColumnCollection(GridViewTemplate owner)
Parameters:ownerGridViewTemplate

The owner.

Properties

Gets or sets the allow case sensitive names.

C#
public bool AllowCaseSensitiveNames { get; set; }
Property Value:

The allow case sensitive names.

Gets the owner.

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

The owner.

Gets the GridViewColumn with the specified column name.

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

Methods

Adds the column with specified name, header text and field name.

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

The name.

headerTextstring

The header text.

fieldNamestring

Name of the field.

Adds the column with specified name and header text.

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

The name.

headerTextstring

The header text.

Adds the column with specified name.

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

The name.

Adds the range.

C#
public virtual void AddRange(params GridViewDataColumn[] gridViewColumns)
Parameters:gridViewColumnsGridViewDataColumn[]

The grid view columns.

Removes all elements from the Collection<T>.

C#
protected override void ClearItems()

Overrides: ObservableCollection<GridViewDataColumn>.ClearItems()

Determines whether a GridViewDataColumn with the specified name exists in the collection.

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

The object to locate.

Returns:

bool

true if item is found otherwise, false.

Gets the name of the column by field.

C#
public GridViewDataColumn[] GetColumnByFieldName(string fieldName)
Parameters:fieldNamestring

Name of the field.

Returns:

GridViewDataColumn[]

Gets the column by header text.

C#
public GridViewDataColumn[] GetColumnByHeaderText(string headerText)
Parameters:headerTextstring

The header text.

Returns:

GridViewDataColumn[]

Indexes the of.

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

Name of the column.

Returns:

int

Overridden. Inserts an item into the collection at the specified index.

C#
protected override void InsertItem(int index, GridViewDataColumn item)
Parameters:indexintitemGridViewDataColumn

Overrides: ObservableCollection<GridViewDataColumn>.InsertItem(int, GridViewDataColumn)

Removes the specified column name.

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

Name of the column.

Removes the element at the specified index of the Collection<T>.

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

The zero-based index of the element to remove.

Exceptions:

ArgumentOutOfRangeException

index is less than zero.-or-index is equal to or greater than Count.

Overrides: ObservableCollection<GridViewDataColumn>.RemoveItem(int)

Renames the specified name.

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

The name.

newNamestring

The new name.

Sets the item.

C#
protected override void SetItem(int index, GridViewDataColumn item)
Parameters:indexint

The index.

itemGridViewDataColumn

The item.

Overrides: ObservableCollection<GridViewDataColumn>.SetItem(int, GridViewDataColumn)