DekGenius.com
[ Team LiB ] Previous Section Next Section

DataViewManager disposable

System.Data (system.data.dll) class

The DataViewManager is used when binding an entire DataSet to a control. When binding a DataSet to a control, you have two choices. You can explicitly create a DataViewManager object and bind that, or you can bind to the DataSet that contains the data. In the latter case, ADO.NET automatically uses the default DataViewManager accessed using the DataSet.DefaultViewManager property.

Understanding this process becomes important if you want to control the display of data (for example, applying a sort of filter expression). When binding an entire DataSet , ADO.NET doesn't use the default DataView objects that are associated with each table and accessed using the DataTable.DefaultView property. Instead, it uses the DataViewSetting . The default DataViewManager for a DataSet contains one DataViewSetting for each DataTable . You can access this collection and modify individual DataViewSetting objects through the DataViewSettings property.

public class DataViewManager : System.ComponentModel.MarshalByValueComponent , 
System.ComponentModel.IBindingList, IList, ICollection, IEnumerable, 
System.ComponentModel.ITypedList {
// Public Constructors
   public DataViewManager(  );  
   public DataViewManager( DataSet dataSet);  
// Public Instance Properties
   public DataSet DataSet{set; get; } 
   public string DataViewSettingCollectionString{set; get; } 
   public DataViewSettingCollection DataViewSettings{get; } 
// Public Instance Methods
   public DataView CreateDataView( DataTable table);  
// Protected Instance Methods
   protected virtual void OnListChanged(System.ComponentModel.ListChangedEventArgs e);
   protected virtual void RelationCollectionChanged(object sender,
        System.ComponentModel.CollectionChangeEventArgs e);
   protected virtual void TableCollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e);
// Events
   public event ListChangedEventHandler ListChanged;        // implements System.ComponentModel.IBindingList
}

Hierarchy

System.Object figs/U2192.gif System.ComponentModel.MarshalByValueComponent(System.ComponentModel.IComponent, System.IDisposable , System.IServiceProvider) figs/U2192.gif DataViewManager(System.ComponentModel.IBindingList, System.Collections.IList , System.Collections.ICollection , System.Collections.IEnumerable , System.ComponentModel.ITypedList)

Returned By

DataSet.DefaultViewManager , DataView.DataViewManager , DataViewSetting.DataViewManager

    [ Team LiB ] Previous Section Next Section