the DataDourceManager class is a wrapper class around different types of datasources. in this case the DataSet, object list using reflection and the OutlooGridRow objects are supported by this class. Basically the DataDourceManager works like a facade that provides access in a uniform way to the datasource. Note: this class is not implemented optimally. It is merely used for demonstration purposes
Beispiel #1
0
 public DataSourceRow(DataSourceManager manager, object boundItem)
 {
     this._manager   = manager;
     this._boundItem = boundItem;
 }
Beispiel #2
0
 public void ClearGroups()
 {
     _dataSource           = null;
     _groupTemplate.Column = null; //reset
     //FillGrid(null);
 }
Beispiel #3
0
        public override void Sort(DataGridViewColumn dataGridViewColumn, ListSortDirection direction)
        {
            if (_dataSource == null) // if no datasource is set, then bind to the grid itself
                _dataSource = new DataSourceManager(this, null);

            _dataSource.Sort(new OutlookGridRowComparer(dataGridViewColumn.Index, direction));
            FillGrid(_groupTemplate);
        }
Beispiel #4
0
        public override void Sort(IComparer comparer)
        {
            if (_dataSource == null) // if no datasource is set, then bind to the grid itself
                _dataSource = new DataSourceManager(this, null);

            _dataSource.Sort(comparer);
            FillGrid(_groupTemplate);
        }
Beispiel #5
0
 public void ClearGroups()
 {
     _dataSource = null;
     _groupTemplate.Column = null; //reset
     //FillGrid(null);
 }
Beispiel #6
0
 public void BindData(object dataSource, string dataMember)
 {
     this.DataMember = DataMember;
     if (dataSource == null)
     {
         this._dataSource = null;
         Columns.Clear();
     }
     else
     {
         this._dataSource = new DataSourceManager(dataSource, dataMember);
         SetupColumns();
         FillGrid(null);
     }
 }
 public DataSourceRow(DataSourceManager manager, object boundItem)
 {
     this._manager = manager;
     this._boundItem = boundItem;
 }