private void LoadDataSourceFields()
 {
     base.EnterLoadingMode();
     if (this.currentDataSource != null)
     {
         PropertyDescriptorCollection fields = this.currentDataSource.Fields;
         if ((fields != null) && (fields.Count > 0))
         {
             DataFieldNode node = new DataFieldNode();
             this.selectedDataSourceNode.Nodes.Add(node);
             IEnumerator enumerator = fields.GetEnumerator();
             while (enumerator.MoveNext())
             {
                 PropertyDescriptor current = (PropertyDescriptor) enumerator.Current;
                 if (BaseDataList.IsBindableType(current.PropertyType))
                 {
                     string name = current.Name;
                     DataFieldNode node2 = new DataFieldNode(name);
                     this.selectedDataSourceNode.Nodes.Add(node2);
                     this.boundColumnEditor.AddDataField(name);
                     this.buttonColumnEditor.AddDataField(name);
                     this.hyperLinkColumnEditor.AddDataField(name);
                     this.editCommandColumnEditor.AddDataField(name);
                     this.columnSortExprCombo.Items.Add(name);
                 }
             }
             this.availableColumnsTree.SelectedNode = node;
             node.EnsureVisible();
         }
     }
     else
     {
         DataFieldNode node3 = new DataFieldNode(null);
         this.availableColumnsTree.Nodes.Insert(0, node3);
         this.availableColumnsTree.SelectedNode = node3;
         node3.EnsureVisible();
     }
     base.ExitLoadingMode();
 }
 private void LoadDataSourceFields()
 {
     this.EnterLoadingMode();
     IDataSourceFieldSchema[] fieldSchemas = this.GetFieldSchemas();
     if ((fieldSchemas != null) && (fieldSchemas.Length > 0))
     {
         DataFieldNode node = new DataFieldNode(this);
         this._availableFieldsTree.Nodes.Insert(0, node);
         foreach (IDataSourceFieldSchema schema in fieldSchemas)
         {
             BoundNode node2 = new BoundNode(this, schema);
             this._selectedDataSourceNode.Nodes.Add(node2);
         }
         this._selectedDataSourceNode.Expand();
         foreach (IDataSourceFieldSchema schema2 in fieldSchemas)
         {
             if ((schema2.DataType == typeof(bool)) || (schema2.DataType == typeof(bool?)))
             {
                 CheckBoxNode node3 = new CheckBoxNode(this, schema2);
                 this._selectedCheckBoxDataSourceNode.Nodes.Add(node3);
             }
         }
         this._selectedCheckBoxDataSourceNode.Expand();
         this._availableFieldsTree.SelectedNode = node;
         node.EnsureVisible();
     }
     else
     {
         BoundNode node4 = new BoundNode(this, null);
         this._availableFieldsTree.Nodes.Insert(0, node4);
         node4.EnsureVisible();
         CheckBoxNode node5 = new CheckBoxNode(this, null);
         this._availableFieldsTree.Nodes.Insert(1, node5);
         node5.EnsureVisible();
         this._availableFieldsTree.SelectedNode = node4;
     }
     this.ExitLoadingMode();
 }