Class GridViewColumnCollection
A collection of GridViewColumn objects
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.GridView.dll
Syntax
public class GridViewColumnCollection : ObservableCollection<GridViewDataColumn>, IList<GridViewDataColumn>, ICollection<GridViewDataColumn>, IReadOnlyList<GridViewDataColumn>, IReadOnlyCollection<GridViewDataColumn>, IEnumerable<GridViewDataColumn>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyCollectionChanging, INotifyPropertyChanged, INotifyPropertyChangingEx
Constructors
GridViewColumnCollection(GridViewTemplate)
Initializes a new instance of the GridViewColumnCollection class.
Declaration
public GridViewColumnCollection(GridViewTemplate owner)
Parameters
GridViewTemplate
owner
The owner. |
Properties
AllowCaseSensitiveNames
Gets or sets the allow case sensitive names.
Declaration
public bool AllowCaseSensitiveNames { get; set; }
Property Value
System.Boolean
The allow case sensitive names. |
Item[String]
Gets the GridViewColumn with the specified column name.
Declaration
public GridViewDataColumn this[string columnName] { get; }
Parameters
System.String
columnName
|
Property Value
GridViewDataColumn
|
Owner
Gets the owner.
Declaration
public GridViewTemplate Owner { get; }
Property Value
GridViewTemplate
The owner. |
Methods
Add(String)
Adds the column with specified name.
Declaration
public void Add(string name)
Parameters
System.String
name
The name. |
Add(String, String)
Adds the column with specified name and header text.
Declaration
public void Add(string name, string headerText)
Parameters
System.String
name
The name. |
System.String
headerText
The header text. |
Add(String, String, String)
Adds the column with specified name, header text and field name.
Declaration
public void Add(string name, string headerText, string fieldName)
Parameters
System.String
name
The name. |
System.String
headerText
The header text. |
System.String
fieldName
Name of the field. |
AddRange(GridViewDataColumn[])
Adds the range.
Declaration
public virtual void AddRange(params GridViewDataColumn[] gridViewColumns)
Parameters
GridViewDataColumn[]
gridViewColumns
The grid view columns. |
ClearItems()
Removes all elements from the System.Collections.ObjectModel.Collection<T>.
Declaration
protected override void ClearItems()
Overrides
Contains(String)
Determines whether a GridViewDataColumn with the specified name exists in the collection.
Declaration
public bool Contains(string columnName)
Parameters
System.String
columnName
The object to locate. |
Returns
System.Boolean
true if item is found otherwise, false. |
GetColumnByFieldName(String)
Gets the name of the column by field.
Declaration
public GridViewDataColumn[] GetColumnByFieldName(string fieldName)
Parameters
System.String
fieldName
Name of the field. |
Returns
GridViewDataColumn[]
|
GetColumnByHeaderText(String)
Gets the column by header text.
Declaration
public GridViewDataColumn[] GetColumnByHeaderText(string headerText)
Parameters
System.String
headerText
The header text. |
Returns
GridViewDataColumn[]
|
IndexOf(String)
Indexes the of.
Declaration
public int IndexOf(string columnName)
Parameters
System.String
columnName
Name of the column. |
Returns
System.Int32
|
InsertItem(Int32, GridViewDataColumn)
Overridden. Inserts an item into the collection at the specified index.
Declaration
protected override void InsertItem(int index, GridViewDataColumn item)
Parameters
System.Int32
index
|
GridViewDataColumn
item
|
Overrides
Remove(String)
Removes the specified column name.
Declaration
public void Remove(string columnName)
Parameters
System.String
columnName
Name of the column. |
RemoveItem(Int32)
Removes the element at the specified index of the System.Collections.ObjectModel.Collection<T>.
Declaration
protected override void RemoveItem(int index)
Parameters
System.Int32
index
The zero-based index of the element to remove. |
Overrides
Exceptions
System.ArgumentOutOfRangeException
|
Rename(String, String)
Renames the specified name.
Declaration
public void Rename(string name, string newName)
Parameters
System.String
name
The name. |
System.String
newName
The new name. |
SetItem(Int32, GridViewDataColumn)
Sets the item.
Declaration
protected override void SetItem(int index, GridViewDataColumn item)
Parameters
System.Int32
index
The index. |
GridViewDataColumn
item
The item. |