다음을 통해 공유


DataGridBoolColumn 클래스

정의

주의

DataGrid is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use DataGridView instead.

각 셀에 부울 값을 나타내는 확인란이 포함된 열을 지정합니다.

public ref class DataGridBoolColumn : System::Windows::Forms::DataGridColumnStyle
public class DataGridBoolColumn : System.Windows.Forms.DataGridColumnStyle
[System.ComponentModel.Browsable(false)]
[System.Obsolete("`DataGrid` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `DataGridView` instead.", false, DiagnosticId="WFDEV006", UrlFormat="https://aka.ms/winforms-warnings/{0}")]
public class DataGridBoolColumn : System.Windows.Forms.DataGridColumnStyle
type DataGridBoolColumn = class
    inherit DataGridColumnStyle
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("`DataGrid` is provided for binary compatibility with .NET Framework and is not intended to be used directly from your code. Use `DataGridView` instead.", false, DiagnosticId="WFDEV006", UrlFormat="https://aka.ms/winforms-warnings/{0}")>]
type DataGridBoolColumn = class
    inherit DataGridColumnStyle
Public Class DataGridBoolColumn
Inherits DataGridColumnStyle
상속
특성

예제

다음 코드 예제에서는 먼저 새로 DataGridBoolColumn 만들어서 에 DataGridTableStyle추가 GridColumnStylesCollection 합니다.

using namespace System;
using namespace System::Data;
using namespace System::Windows::Forms;
using namespace System::Drawing;
using namespace System::ComponentModel;

public ref class DataGridBoolColumnInherit: public DataGridBoolColumn
{
private:
   SolidBrush^ trueBrush;
   SolidBrush^ falseBrush;
   DataColumn^ expressionColumn;
   static int count = 0;

public:
   DataGridBoolColumnInherit()
      : DataGridBoolColumn()
   {
      trueBrush = dynamic_cast<SolidBrush^>(Brushes::Blue);
      falseBrush = dynamic_cast<SolidBrush^>(Brushes::Yellow);
      expressionColumn = nullptr;
      count++;
   }

   property Color FalseColor 
   {
      Color get()
      {
         return falseBrush->Color;
      }

      void set( Color value )
      {
         falseBrush = gcnew System::Drawing::SolidBrush( value );
         Invalidate();
      }
   }

   property Color TrueColor 
   {
      Color get()
      {
         return trueBrush->Color;
      }

      void set( Color value )
      {
         trueBrush = gcnew System::Drawing::SolidBrush( value );
         Invalidate();
      }
   }

   property String^ Expression 
   {
      // This will work only with a DataSet or DataTable.
      // The code is not compatible with IBindingList* implementations.
      String^ get()
      {
         return this->expressionColumn == nullptr ? String::Empty : this->expressionColumn->Expression;
      }

      void set( String^ value )
      {
         if ( expressionColumn == nullptr )
                  AddExpressionColumn( value );
         else
                  expressionColumn->Expression = value;

         if ( expressionColumn != nullptr && expressionColumn->Expression->Equals( value ) )
                  return;

         Invalidate();
      }
   }

private:
   void AddExpressionColumn( String^ value )
   {
      // Get the grid's data source. First check for a 0 
      // table or data grid.
      if ( this->DataGridTableStyle == nullptr || this->DataGridTableStyle->DataGrid == nullptr )
            return;

      DataGrid^ myGrid = this->DataGridTableStyle->DataGrid;
      DataView^ myDataView = dynamic_cast<DataView^>((dynamic_cast<CurrencyManager^>(myGrid->BindingContext[ myGrid->DataSource,myGrid->DataMember ]))->List);

      // This works only with System::Data::DataTable.
      if ( myDataView == nullptr )
            return;

      // If the user already added a column with the name 
      // then exit. Otherwise, add the column and set the 
      // expression to the value passed to this function.
      DataColumn^ col = myDataView->Table->Columns[ "__Computed__Column__" ];
      if ( col != nullptr )
            return;

      col = gcnew DataColumn( String::Concat( "__Computed__Column__", count ) );
      myDataView->Table->Columns->Add( col );
      col->Expression = value;
      expressionColumn = col;
   }

   //  the OnPaint method to paint the cell based on the expression.
protected:
   virtual void Paint( Graphics^ g, Rectangle bounds, CurrencyManager^ source, int rowNum, Brush^ backBrush, Brush^ foreBrush, bool alignToRight ) override
   {
      bool trueExpression = false;
      bool hasExpression = false;
      DataRowView^ drv = dynamic_cast<DataRowView^>(source->List[ rowNum ]);
      hasExpression = this->expressionColumn != nullptr && this->expressionColumn->Expression != nullptr &&  !this->expressionColumn->Expression->Equals( String::Empty );
      Console::WriteLine( String::Format( "hasExpressionValue {0}", hasExpression ) );

      // Get the value from the expression column.
      // For simplicity, we assume a True/False value for the 
      // expression column.
      if ( hasExpression )
      {
         Object^ expr = drv->Row[ expressionColumn->ColumnName ];
         trueExpression = expr->Equals( "True" );
      }

      // Let the DataGridBoolColumn do the painting.
      if (  !hasExpression )
            DataGridBoolColumn::Paint( g, bounds, source, rowNum, backBrush, foreBrush, alignToRight );

      // Paint using the expression color for true or false, as calculated.
      if ( trueExpression )
            DataGridBoolColumn::Paint( g, bounds, source, rowNum, trueBrush, foreBrush, alignToRight );
      else
            DataGridBoolColumn::Paint( g, bounds, source, rowNum, falseBrush, foreBrush, alignToRight );
   }
};

public ref class MyForm: public Form
{
private:
   DataTable^ myTable;
   DataGrid^ myGrid;

public:
   MyForm()
   {
      myGrid = gcnew DataGrid;
      try
      {
         InitializeComponent();
         myTable = gcnew DataTable( "NamesTable" );
         myTable->Columns->Add( gcnew DataColumn( "Name" ) );
         DataColumn^ column = gcnew DataColumn( "id",Int32::typeid );
         myTable->Columns->Add( column );
         myTable->Columns->Add( gcnew DataColumn( "calculatedField",bool::typeid ) );
         DataSet^ namesDataSet = gcnew DataSet;
         namesDataSet->Tables->Add( myTable );
         myGrid->SetDataBinding( namesDataSet, "NamesTable" );
         AddTableStyle();
         AddData();
      }
      catch ( System::Exception^ exc ) 
      {
         Console::WriteLine( exc );
      }
   }

private:
   void grid_Enter( Object^ sender, EventArgs^ e )
   {
      myGrid->CurrentCell = DataGridCell(2,2);
   }

   void AddTableStyle()
   {
      // Map a new  TableStyle to the DataTable. Then 
      // add DataGridColumnStyle objects to the collection
      // of column styles with appropriate mappings.
      DataGridTableStyle^ dgt = gcnew DataGridTableStyle;
      dgt->MappingName = "NamesTable";
      DataGridTextBoxColumn^ dgtbc = gcnew DataGridTextBoxColumn;
      dgtbc->MappingName = "Name";
      dgtbc->HeaderText = "Name";
      dgt->GridColumnStyles->Add( dgtbc );
      dgtbc = gcnew DataGridTextBoxColumn;
      dgtbc->MappingName = "id";
      dgtbc->HeaderText = "id";
      dgt->GridColumnStyles->Add( dgtbc );
      DataGridBoolColumnInherit^ db = gcnew DataGridBoolColumnInherit;
      db->HeaderText = "less than 1000 = blue";
      db->Width = 150;
      db->MappingName = "calculatedField";
      dgt->GridColumnStyles->Add( db );
      myGrid->TableStyles->Add( dgt );

      // This expression instructs the grid to change
      // the color of the inherited DataGridBoolColumn
      // according to the value of the id field. If it's
      // less than 1000, the row is blue. Otherwise,
      // the color is yellow.
      db->Expression = "id < 1000";
   }

   void AddData()
   {
      // Add data with varying numbers for the id field.
      // If the number is over 1000, the cell will paint
      // yellow. Otherwise, it will be blue.
      DataRow^ dRow = myTable->NewRow();
      dRow[ "Name" ] = "name 1 ";
      dRow[ "id" ] = 999;
      myTable->Rows->Add( dRow );
      dRow = myTable->NewRow();
      dRow[ "Name" ] = "name 2";
      dRow[ "id" ] = 2300;
      myTable->Rows->Add( dRow );
      dRow = myTable->NewRow();
      dRow[ "Name" ] = "name 3";
      dRow[ "id" ] = 120;
      myTable->Rows->Add( dRow );
      dRow = myTable->NewRow();
      dRow[ "Name" ] = "name 4";
      dRow[ "id" ] = 4023;
      myTable->Rows->Add( dRow );
      dRow = myTable->NewRow();
      dRow[ "Name" ] = "name 5";
      dRow[ "id" ] = 2345;
      myTable->Rows->Add( dRow );
      myTable->AcceptChanges();
   }

   void InitializeComponent()
   {
      this->Size = System::Drawing::Size( 500, 500 );
      myGrid->Size = System::Drawing::Size( 350, 250 );
      myGrid->TabStop = true;
      myGrid->TabIndex = 1;
      this->StartPosition = FormStartPosition::CenterScreen;
      this->Controls->Add( myGrid );
   }
};

[STAThread]
int main()
{
   Application::Run( gcnew MyForm );
}
using System;
using System.Data;
using System.Windows.Forms;
using System.Drawing;
using System.ComponentModel;

public class MyForm : Form 
{
    private DataTable myTable;
    private DataGrid myGrid = new DataGrid();
    
    public MyForm() : base() 
    {
        try
        {
            InitializeComponent();

            myTable = new DataTable("NamesTable");
            myTable.Columns.Add(new DataColumn("Name"));
            DataColumn column = new DataColumn
                ("id", typeof(System.Int32));
            myTable.Columns.Add(column);
            myTable.Columns.Add(new 
                DataColumn("calculatedField", typeof(bool)));
            DataSet namesDataSet = new DataSet();
            namesDataSet.Tables.Add(myTable);
            myGrid.SetDataBinding(namesDataSet, "NamesTable");
        
            AddTableStyle();
            AddData();
        }
        catch (System.Exception exc)
        {
            Console.WriteLine(exc.ToString());
        }
    }

    private void grid_Enter(object sender, EventArgs e) 
    {
        myGrid.CurrentCell = new DataGridCell(2,2);
    }

    private void AddTableStyle()
    {
        // Map a new  TableStyle to the DataTable. Then 
        // add DataGridColumnStyle objects to the collection
        // of column styles with appropriate mappings.
        DataGridTableStyle dgt = new DataGridTableStyle();
        dgt.MappingName = "NamesTable";

        DataGridTextBoxColumn dgtbc = new DataGridTextBoxColumn();
        dgtbc.MappingName = "Name";
        dgtbc.HeaderText= "Name";
        dgt.GridColumnStyles.Add(dgtbc);

        dgtbc = new DataGridTextBoxColumn();
        dgtbc.MappingName = "id";
        dgtbc.HeaderText= "id";
        dgt.GridColumnStyles.Add(dgtbc);

        DataGridBoolColumnInherit db = 
            new DataGridBoolColumnInherit();
        db.HeaderText= "less than 1000 = blue";
        db.Width= 150;
        db.MappingName = "calculatedField";
        dgt.GridColumnStyles.Add(db);

        myGrid.TableStyles.Add(dgt);

        // This expression instructs the grid to change
        // the color of the inherited DataGridBoolColumn
        // according to the value of the id field. If it's
        // less than 1000, the row is blue. Otherwise,
        // the color is yellow.
        db.Expression = "id < 1000";
    }

    private void AddData() 
    {
        // Add data with varying numbers for the id field.
        // If the number is over 1000, the cell will paint
        // yellow. Otherwise, it will be blue.
        DataRow dRow = myTable.NewRow();

        dRow["Name"] = "name 1 ";
        dRow["id"] = 999;
        myTable.Rows.Add(dRow);

        dRow = myTable.NewRow();
        dRow["Name"] = "name 2";
        dRow["id"] = 2300;
        myTable.Rows.Add(dRow);

        dRow = myTable.NewRow();
        dRow["Name"] = "name 3";
        dRow["id"] = 120;
        myTable.Rows.Add(dRow);

        dRow = myTable.NewRow();
        dRow["Name"] = "name 4";
        dRow["id"] = 4023;
        myTable.Rows.Add(dRow);

        dRow = myTable.NewRow();
        dRow["Name"] = "name 5";
        dRow["id"] = 2345;
        myTable.Rows.Add(dRow);

        myTable.AcceptChanges();
    }

    private void InitializeComponent() 
    {
        this.Size = new Size(500, 500);
        myGrid.Size = new Size(350, 250);
        myGrid.TabStop = true;
        myGrid.TabIndex = 1;
      
        this.StartPosition = FormStartPosition.CenterScreen;
        this.Controls.Add(myGrid);
      }
    [STAThread]
    public static void Main() 
    {
        Application.Run(new MyForm());
    }
}

public class DataGridBoolColumnInherit : DataGridBoolColumn 
{
    private SolidBrush trueBrush = Brushes.Blue as SolidBrush;
    private SolidBrush falseBrush = Brushes.Yellow as SolidBrush;
    private DataColumn expressionColumn = null;
    private static int count = 0;

    public Color FalseColor 
    {
        get 
        {
            return falseBrush.Color;
        }
        set 
        {
            falseBrush = new SolidBrush(value);
            Invalidate();
        }
    }

    public Color TrueColor 
    {
        get 
        {
            return trueBrush.Color;
        }
        set 
        {
            trueBrush = new SolidBrush(value);
            Invalidate();
        }
    }

    public DataGridBoolColumnInherit() : base () 
    {
        count ++;
    }

    // This will work only with a DataSet or DataTable.
    // The code is not compatible with IBindingList implementations.
    public string Expression 
    {
        get 
        {
            return this.expressionColumn == null ? String.Empty : 
                this.expressionColumn.Expression;
        }
        set 
        {
            if (expressionColumn == null)
                AddExpressionColumn(value);
            else 
                expressionColumn.Expression = value;
            if (expressionColumn != null && 
                expressionColumn.Expression.Equals(value))
                return;
            Invalidate();
        }
    }

    private void AddExpressionColumn(string value) 
    {
        // Get the grid's data source. First check for a null 
        // table or data grid.
        if (this.DataGridTableStyle == null || 
            this.DataGridTableStyle.DataGrid == null)
            return;

        DataGrid myGrid = this.DataGridTableStyle.DataGrid;
        DataView myDataView = ((CurrencyManager) 
            myGrid.BindingContext[myGrid.DataSource, 
            myGrid.DataMember]).List 
            as DataView;

        // This works only with System.Data.DataTable.
        if (myDataView == null)
            return;

        // If the user already added a column with the name 
        // then exit. Otherwise, add the column and set the 
        // expression to the value passed to this function.
        DataColumn col = myDataView.Table.Columns["__Computed__Column__"];
        if (col != null)
            return;
        col = new DataColumn("__Computed__Column__" + count.ToString());

        myDataView.Table.Columns.Add(col);
        col.Expression = value;
        expressionColumn = col;
    }

    // override the OnPaint method to paint the cell based on the expression.
    protected override void Paint(Graphics g, Rectangle bounds,
        CurrencyManager source, int rowNum,
        Brush backBrush, Brush foreBrush,
        bool alignToRight) 
    {
        bool trueExpression = false;
        bool hasExpression = false;
        DataRowView drv = source.List[rowNum] as DataRowView;

        hasExpression = this.expressionColumn != null && 
            this.expressionColumn.Expression != null && 
            !this.expressionColumn.Expression.Equals(String.Empty);

        Console.WriteLine(string.Format("hasExpressionValue {0}",hasExpression));
        // Get the value from the expression column.
        // For simplicity, we assume a True/False value for the 
        // expression column.
        if (hasExpression) 
        {
            object expr = drv.Row[expressionColumn.ColumnName];
            trueExpression = expr.Equals("True");
        }

        // Let the DataGridBoolColumn do the painting.
        if (!hasExpression)
            base.Paint(g, bounds, source, rowNum, 
                backBrush, foreBrush, alignToRight);

        // Paint using the expression color for true or false, as calculated.
        if (trueExpression)
            base.Paint(g, bounds, source, rowNum, 
                trueBrush, foreBrush, alignToRight);
        else
            base.Paint(g, bounds, source, rowNum, 
                falseBrush, foreBrush, alignToRight);
    }
}
Imports System.Data
Imports System.Windows.Forms
Imports System.Drawing
Imports System.ComponentModel

Public Class MyForm
    Inherits System.Windows.Forms.Form
    Private components As System.ComponentModel.Container
    Private myTable As DataTable
    Private myGrid As DataGrid = New DataGrid()

    Public Shared Sub Main()
        Application.Run(New MyForm())
    End Sub

    Public Sub New()
        Try
            InitializeComponent()
            myTable = New DataTable("NamesTable")
            myTable.Columns.Add(New DataColumn("Name"))
            Dim column As DataColumn = New DataColumn _
            ("id", GetType(System.Int32))
            myTable.Columns.Add(column)
            myTable.Columns.Add(New DataColumn _
            ("calculatedField", GetType(Boolean)))
            Dim namesDataSet As DataSet = New DataSet("myDataSet")
            namesDataSet.Tables.Add(myTable)
            myGrid.SetDataBinding(namesDataSet, "NamesTable")
            AddData()
            AddTableStyle()

        Catch exc As System.Exception
            Console.WriteLine(exc.ToString)
        End Try
    End Sub

    Private Sub AddTableStyle()
        ' Map a new  TableStyle to the DataTable. Then 
        ' add DataGridColumnStyle objects to the collection
        ' of column styles with appropriate mappings.
        Dim dgt As DataGridTableStyle = New DataGridTableStyle()
        dgt.MappingName = "NamesTable"

        Dim dgtbc As DataGridTextBoxColumn = _
        New DataGridTextBoxColumn()
        dgtbc.MappingName = "Name"
        dgtbc.HeaderText = "Name"
        dgt.GridColumnStyles.Add(dgtbc)

        dgtbc = New DataGridTextBoxColumn()
        dgtbc.MappingName = "id"
        dgtbc.HeaderText = "id"
        dgt.GridColumnStyles.Add(dgtbc)

        Dim db As DataGridBoolColumnInherit = _
        New DataGridBoolColumnInherit()
        db.HeaderText = "less than 1000 = blue"
        db.Width = 150
        db.MappingName = "calculatedField"
        dgt.GridColumnStyles.Add(db)

        myGrid.TableStyles.Add(dgt)

        ' This expression instructs the grid to change
        ' the color of the inherited DataGridBoolColumn
        ' according to the value of the id field. If it's
        ' less than 1000, the row is blue. Otherwise,
        ' the color is yellow.
        db.Expression = "id < 1000"
    End Sub

    Private Sub AddData()

        ' Add data with varying numbers for the id field.
        ' If the number is over 1000, the cell will paint
        ' yellow. Otherwise, it will be blue.
        Dim dRow As DataRow

        dRow = myTable.NewRow()
        dRow("Name") = "name 1"
        dRow("id") = 999
        myTable.Rows.Add(dRow)

        dRow = myTable.NewRow()
        dRow("Name") = "name 2"
        dRow("id") = 2300
        myTable.Rows.Add(dRow)

        dRow = myTable.NewRow()
        dRow("Name") = "name 3"
        dRow("id") = 120
        myTable.Rows.Add(dRow)

        dRow = myTable.NewRow()
        dRow("Name") = "name 4"
        dRow("id") = 4023
        myTable.Rows.Add(dRow)

        dRow = myTable.NewRow()
        dRow("Name") = "name 5"
        dRow("id") = 2345
        myTable.Rows.Add(dRow)

        myTable.AcceptChanges()
    End Sub

    Private Sub InitializeComponent()
        Me.Size = New Size(500, 500)
        myGrid.Size = New Size(350, 250)
        myGrid.TabStop = True
        myGrid.TabIndex = 1
        Me.StartPosition = FormStartPosition.CenterScreen
        Me.Controls.Add(myGrid)
    End Sub

End Class


Public Class DataGridBoolColumnInherit
    Inherits DataGridBoolColumn

    Private trueBrush As SolidBrush = Brushes.Blue
    Private falseBrush As SolidBrush = Brushes.Yellow
    Private expressionColumn As DataColumn = Nothing
    Shared count As Int32 = 0

    Public Property FalseColor() As Color
        Get
            Return falseBrush.Color
        End Get

        Set(ByVal Value As Color)

            falseBrush = New SolidBrush(Value)
            Invalidate()
        End Set
    End Property

    Public Property TrueColor() As Color
        Get
            Return trueBrush.Color
        End Get

        Set(ByVal Value As Color)

            trueBrush = New SolidBrush(Value)
            Invalidate()
        End Set
    End Property

    Public Sub New()
        count += 1
    End Sub

    ' This will work only with a DataSet or DataTable.
    ' The code is not compatible with IBindingList implementations.
    Public Property Expression() As String
        Get
            If Me.expressionColumn Is Nothing Then
                Return String.Empty
            Else
                Return Me.expressionColumn.Expression
            End If
        End Get
        Set(ByVal Value As String)
            If expressionColumn Is Nothing Then
                AddExpressionColumn(Value)
            Else
                expressionColumn.Expression = Value
            End If
            If (expressionColumn IsNot Nothing) And expressionColumn.Expression.Equals(Value) Then
                Return
            End If
            Invalidate()
        End Set
    End Property

    Private Sub AddExpressionColumn(ByVal value As String)
        ' Get the grid's data source. First check for a null 
        ' table or data grid.
        If Me.DataGridTableStyle Is Nothing Or _
        Me.DataGridTableStyle.DataGrid Is Nothing Then
            Return
        End If

        Dim dg As DataGrid = Me.DataGridTableStyle.DataGrid
        Dim dv As DataView = CType(dg.BindingContext(dg.DataSource, dg.DataMember), CurrencyManager).List

        ' This works only with System.Data.DataTable.
        If dv Is Nothing Then
            Return
        End If

        ' If the user already added a column with the name 
        ' then exit. Otherwise, add the column and set the 
        ' expression to the value passed to this function.
        Dim col As DataColumn = dv.Table.Columns("__Computed__Column__")
        If (col IsNot Nothing) Then
            Return
        End If
        col = New DataColumn("__Computed__Column__" + count.ToString())

        dv.Table.Columns.Add(col)

        col.Expression = value
        expressionColumn = col
    End Sub


    ' Override the OnPaint method to paint the cell based on the expression.
    Protected Overloads Overrides Sub Paint _
    (ByVal g As Graphics, _
    ByVal bounds As Rectangle, _
    ByVal [source] As CurrencyManager, _
    ByVal rowNum As Integer, _
    ByVal backBrush As Brush, _
    ByVal foreBrush As Brush, _
    ByVal alignToRight As Boolean)
        Dim trueExpression As Boolean = False
        Dim hasExpression As Boolean = False
        Dim drv As DataRowView = [source].List(rowNum)
        hasExpression = (Me.expressionColumn IsNot Nothing) And (Me.expressionColumn.Expression IsNot Nothing) And Not Me.expressionColumn.Expression.Equals([String].Empty)

        ' Get the value from the expression column.
        ' For simplicity, we assume a True/False value for the 
        ' expression column.
        If hasExpression Then
            Dim expr As Object = drv.Row(expressionColumn.ColumnName)
            trueExpression = expr.Equals("True")
        End If

        ' Let the DataGridBoolColumn do the painting.
        If Not hasExpression Then
            MyBase.Paint(g, bounds, [source], rowNum, backBrush, foreBrush, alignToRight)
        End If

        ' Paint using the expression color for true or false, as calculated.
        If trueExpression Then
            MyBase.Paint(g, bounds, [source], rowNum, trueBrush, foreBrush, alignToRight)
        Else
            MyBase.Paint(g, bounds, [source], rowNum, falseBrush, foreBrush, alignToRight)
        End If
    End Sub
End Class

설명

DataGridBoolColumn 클래스DataGridColumnStyle에서 abstract 파생됩니다. 런타임에 DataGridBoolColumn 각 셀에는 기본적으로 선택됨(), 선택되지 않은(truefalse) 및 Value. 2개 상태 확인란을 사용하려면 속성을 false.로 설정합니다AllowNull.

클래스에 추가된 속성에는 , FalseValueNullValueTrueValue. 이러한 속성은 각 열 상태의 기본 값을 지정합니다.

생성자

Name Description
DataGridBoolColumn()
사용되지 않음.

DataGridBoolColumn 클래스의 새 인스턴스를 초기화합니다.

DataGridBoolColumn(PropertyDescriptor, Boolean)
사용되지 않음.

지정된 PropertyDescriptor클래스를 사용하여 클래스의 DataGridBoolColumn 새 인스턴스를 초기화하고 열 스타일이 기본 열인지 여부를 지정합니다.

DataGridBoolColumn(PropertyDescriptor)
사용되지 않음.

지정된 클래스를 사용하여 클래스의 DataGridBoolColumn 새 인스턴스를 초기화합니다 PropertyDescriptor.

속성

Name Description
Alignment
사용되지 않음.

열의 텍스트 맞춤을 가져오거나 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)
AllowNull
사용되지 않음.

null 값이 허용되는지 여부를 나타내는 값을 가져오거나 설정합니다.

CanRaiseEvents
사용되지 않음.

구성 요소가 이벤트를 발생시키는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 Component)
Container
사용되지 않음.

IContainer 포함하는 값을 가져옵니다 Component.

(다음에서 상속됨 Component)
DataGridTableStyle
사용되지 않음.

열의 DataGridTableStyle 값을 가져옵니다.

(다음에서 상속됨 DataGridColumnStyle)
DesignMode
사용되지 않음.

현재 디자인 모드인지 여부를 Component 나타내는 값을 가져옵니다.

(다음에서 상속됨 Component)
Events
사용되지 않음.

Component에 연결된 이벤트 처리기 목록을 가져옵니다.

(다음에서 상속됨 Component)
FalseValue
사용되지 않음.

false값을 .로 설정할 때 사용되는 실제 값을 가져오거나 설정합니다.

FontHeight
사용되지 않음.

열 글꼴의 높이를 가져옵니다.

(다음에서 상속됨 DataGridColumnStyle)
HeaderAccessibleObject
사용되지 않음.

열의 AccessibleObject 값을 가져옵니다.

(다음에서 상속됨 DataGridColumnStyle)
HeaderText
사용되지 않음.

열 머리글의 텍스트를 가져오거나 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)
MappingName
사용되지 않음.

열 스타일을 매핑할 데이터 멤버의 이름을 가져오거나 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)
NullText
사용되지 않음.

열에 포함 null할 때 표시되는 텍스트를 가져오거나 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)
NullValue
사용되지 않음.

Value값을 .로 설정할 때 사용되는 실제 값을 가져오거나 설정합니다.

PropertyDescriptor
사용되지 않음.

PropertyDescriptor 의해 DataGridColumnStyle표시되는 데이터의 특성을 결정하는 값을 가져오거나 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)
ReadOnly
사용되지 않음.

열의 데이터를 편집할 수 있는지 여부를 나타내는 값을 가져오거나 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)
Site
사용되지 않음.

ISite값을 Component 가져오거나 설정합니다.

(다음에서 상속됨 Component)
TrueValue
사용되지 않음.

true값을 .로 설정할 때 사용되는 실제 값을 가져오거나 설정합니다.

Width
사용되지 않음.

열의 너비를 가져오거나 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)

메서드

Name Description
Abort(Int32)
사용되지 않음.

편집 프로시저를 중단하라는 요청을 시작합니다.

BeginUpdate()
사용되지 않음.

메서드가 호출될 때까지 열 그리기를 EndUpdate() 일시 중단합니다.

(다음에서 상속됨 DataGridColumnStyle)
CheckValidDataSource(CurrencyManager)
사용되지 않음.

유효한 데이터 원본이 DataGrid 없거나 이 열이 데이터 원본의 유효한 속성에 매핑되지 않은 경우 예외를 throw합니다.

(다음에서 상속됨 DataGridColumnStyle)
ColumnStartedEditing(Control)
사용되지 않음.

DataGrid 사용자가 열 편집을 시작했음을 알립니다.

(다음에서 상속됨 DataGridColumnStyle)
Commit(CurrencyManager, Int32)
사용되지 않음.

편집 절차를 완료하기 위한 요청을 시작합니다.

ConcedeFocus()
사용되지 않음.

호스트하는 컨트롤에 포커스를 포기해야 한다는 것을 열에 알깁니다.

ConcedeFocus()
사용되지 않음.

호스트하는 컨트롤에 포커스를 포기해야 한다는 것을 열에 알깁니다.

(다음에서 상속됨 DataGridColumnStyle)
CreateHeaderAccessibleObject()
사용되지 않음.

열의 AccessibleObject 값을 가져옵니다.

(다음에서 상속됨 DataGridColumnStyle)
CreateObjRef(Type)
사용되지 않음.

원격 개체와 통신하는 데 사용되는 프록시를 생성하는 데 필요한 모든 관련 정보를 포함하는 개체를 만듭니다.

(다음에서 상속됨 MarshalByRefObject)
Dispose()
사용되지 않음.

에서 사용하는 모든 리소스를 Component해제합니다.

(다음에서 상속됨 Component)
Dispose(Boolean)
사용되지 않음.

관리되지 않는 리소스를 Component 해제하고 관리되는 리소스를 선택적으로 해제합니다.

(다음에서 상속됨 Component)
Edit(CurrencyManager, Int32, Rectangle, Boolean, String, Boolean)
사용되지 않음.

값을 편집할 셀을 준비합니다.

Edit(CurrencyManager, Int32, Rectangle, Boolean, String)
사용되지 않음.

지정 CurrencyManager한, 행 번호 및 Rectangle 매개 변수를 사용하여 편집할 셀을 준비합니다.

(다음에서 상속됨 DataGridColumnStyle)
Edit(CurrencyManager, Int32, Rectangle, Boolean)
사용되지 않음.

편집할 셀을 준비합니다.

(다음에서 상속됨 DataGridColumnStyle)
EndUpdate()
사용되지 않음.

메서드를 호출하여 일시 중단된 열의 그리기를 다시 시작합니다 BeginUpdate() .

(다음에서 상속됨 DataGridColumnStyle)
EnterNullValue()
사용되지 않음.

열에 A Value 를 입력합니다.

EnterNullValue()
사용되지 않음.

열에 A Value 를 입력합니다.

(다음에서 상속됨 DataGridColumnStyle)
Equals(Object)
사용되지 않음.

지정된 개체가 현재 개체와 같은지 여부를 확인합니다.

(다음에서 상속됨 Object)
GetColumnValueAtRow(CurrencyManager, Int32)
사용되지 않음.

지정된 행의 값을 가져옵니다.

GetColumnValueAtRow(CurrencyManager, Int32)
사용되지 않음.

지정된 행의 값을 지정된 CurrencyManager행에서 가져옵니다.

(다음에서 상속됨 DataGridColumnStyle)
GetHashCode()
사용되지 않음.

기본 해시 함수로 사용됩니다.

(다음에서 상속됨 Object)
GetLifetimeService()
사용되지 않음.

이 인스턴스의 수명 정책을 제어하는 현재 수명 서비스 개체를 검색합니다.

(다음에서 상속됨 MarshalByRefObject)
GetMinimumHeight()
사용되지 않음.

열에 있는 셀의 높이를 가져옵니다.

GetPreferredHeight(Graphics, Object)
사용되지 않음.

열 크기를 조정할 때 사용되는 높이를 가져옵니다.

GetPreferredSize(Graphics, Object)
사용되지 않음.

포함할 특정 값이 지정된 셀의 최적 너비와 높이를 가져옵니다.

GetService(Type)
사용되지 않음.

또는 해당 서비스에서 제공하는 서비스를 나타내는 개체를 Component 반환합니다 Container.

(다음에서 상속됨 Component)
GetType()
사용되지 않음.

현재 인스턴스의 Type 가져옵니다.

(다음에서 상속됨 Object)
InitializeLifetimeService()
사용되지 않음.

이 인스턴스의 수명 정책을 제어하는 수명 서비스 개체를 가져옵니다.

(다음에서 상속됨 MarshalByRefObject)
Invalidate()
사용되지 않음.

열을 다시 그리면 페인트 메시지가 컨트롤로 전송됩니다.

(다음에서 상속됨 DataGridColumnStyle)
MemberwiseClone()
사용되지 않음.

현재 Object단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
MemberwiseClone(Boolean)
사용되지 않음.

현재 MarshalByRefObject 개체의 단순 복사본을 만듭니다.

(다음에서 상속됨 MarshalByRefObject)
Paint(Graphics, Rectangle, CurrencyManager, Int32, Boolean)
사용되지 않음.

DataGridBoolColumn 지정된 Graphics, Rectangle행 번호 및 맞춤 설정을 사용하여 그립니다.

Paint(Graphics, Rectangle, CurrencyManager, Int32, Brush, Brush, Boolean)
사용되지 않음.

DataGridBoolColumn 지정된 Graphics, Rectangle행 번호 BrushColor.를 사용하여 그립니다.

Paint(Graphics, Rectangle, CurrencyManager, Int32, Brush, Brush, Boolean)
사용되지 않음.

DataGridColumnStyle 지정Graphics한 , , 행 RectangleCurrencyManager번호, 배경색, 전경색 및 맞춤으로 A를 그립니다.

(다음에서 상속됨 DataGridColumnStyle)
Paint(Graphics, Rectangle, CurrencyManager, Int32)
사용되지 않음.

DataGridBoolColumn 지정된 GraphicsRectangle 행 번호와 함께 그립니다.

ReleaseHostedControl()
사용되지 않음.

호스트하는 컨트롤이 필요하지 않은 경우 열에서 리소스를 해제할 수 있습니다.

(다음에서 상속됨 DataGridColumnStyle)
ResetHeaderText()
사용되지 않음.

HeaderText 기본값null으로 다시 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)
SetColumnValueAtRow(CurrencyManager, Int32, Object)
사용되지 않음.

지정된 행의 값을 설정합니다.

SetColumnValueAtRow(CurrencyManager, Int32, Object)
사용되지 않음.

지정된 행의 값을 지정된 행의 값 CurrencyManager으로 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)
SetDataGrid(DataGrid)
사용되지 않음.

이 열이 DataGrid 속한 컨트롤을 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)
SetDataGridInColumn(DataGrid)
사용되지 않음.

열의 DataGrid 값을 설정합니다.

(다음에서 상속됨 DataGridColumnStyle)
ToString()
사용되지 않음.

String(있는 경우)의 Component이름을 포함하는 값을 반환합니다. 이 메서드는 재정의해서는 안 됩니다.

(다음에서 상속됨 Component)
UpdateUI(CurrencyManager, Int32, String)
사용되지 않음.

지정된 행의 값을 지정된 텍스트로 업데이트합니다.

(다음에서 상속됨 DataGridColumnStyle)

이벤트

Name Description
AlignmentChanged
사용되지 않음.

속성 값이 변경되면 Alignment 발생합니다.

(다음에서 상속됨 DataGridColumnStyle)
AllowNullChanged
사용되지 않음.

속성이 AllowNull 변경될 때 발생합니다.

Disposed
사용되지 않음.

구성 요소가 메서드 호출에 Dispose() 의해 삭제될 때 발생합니다.

(다음에서 상속됨 Component)
FalseValueChanged
사용되지 않음.

속성이 FalseValue 변경될 때 발생합니다.

FontChanged
사용되지 않음.

열의 글꼴이 변경되면 발생합니다.

(다음에서 상속됨 DataGridColumnStyle)
HeaderTextChanged
사용되지 않음.

속성 값이 변경되면 HeaderText 발생합니다.

(다음에서 상속됨 DataGridColumnStyle)
MappingNameChanged
사용되지 않음.

값이 변경되면 MappingName 발생합니다.

(다음에서 상속됨 DataGridColumnStyle)
NullTextChanged
사용되지 않음.

값이 변경되면 NullText 발생합니다.

(다음에서 상속됨 DataGridColumnStyle)
PropertyDescriptorChanged
사용되지 않음.

속성 값이 변경되면 PropertyDescriptor 발생합니다.

(다음에서 상속됨 DataGridColumnStyle)
ReadOnlyChanged
사용되지 않음.

속성 값이 변경되면 ReadOnly 발생합니다.

(다음에서 상속됨 DataGridColumnStyle)
TrueValueChanged
사용되지 않음.

속성 값이 TrueValue 변경될 때 발생합니다.

WidthChanged
사용되지 않음.

속성 값이 변경되면 Width 발생합니다.

(다음에서 상속됨 DataGridColumnStyle)

명시적 인터페이스 구현

Name Description
IDataGridColumnStyleEditingNotificationService.ColumnStartedEditing(Control)
사용되지 않음.

DataGrid 사용자가 열 편집을 시작했음을 컨트롤에 알립니다.

(다음에서 상속됨 DataGridColumnStyle)

적용 대상

추가 정보