DataGridColumnCollection

DataGridColumnCollection

System.Web.UI.WebControls (system.web.dll)sealed class

This is the collection of DataGridColumn objects in a DataGrid control. It is provided through the DataGrid.Columns property. You can use this collection to programmatically add or remove columns, but these changes will not be automatically persisted over postbacks because the DataGrid.Columns property is not stored in view state. This collection will only contain columns that have been added through templates, not automatically generated ones.

public sealed class DataGridColumnCollection : ICollection, IEnumerable, System.Web.UI.IStateManager { // Public Constructors    public DataGridColumnCollection(DataGrid owner, System.Collections.ArrayList columns); // Public Instance Properties    public int Count{get; }                          // implements ICollection    public bool IsReadOnly{get; }    public bool IsSynchronized{get; }                // implements ICollection    public object SyncRoot{get; }                    // implements ICollection    public DataGridColumn this[int index]{get; } // Public Instance Methods    public void Add(DataGridColumn column);    public void AddAt(int index, DataGridColumn column);    public void Clear( );    public void CopyTo(Array array, int index);                  // implements ICollection    public IEnumerator GetEnumerator( );              // implements IEnumerable    public int IndexOf(DataGridColumn column);    public void Remove(DataGridColumn column);    public void RemoveAt(int index); }

Returned By

DataGrid.Columns



ASP. NET in a Nutshell
ASP.NET in a Nutshell, Second Edition
ISBN: 0596005202
EAN: 2147483647
Year: 2003
Pages: 873

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net