Name

DataGridBoolColumn

Synopsis

This DataGridColumnStyle class supports true/false values, representing them as a checkbox. If you set the AllowNull property, you can extend this to true/false/null support, with a tristate checkbox.

In addition to the base behavior, you can set the TrueValue, FalseValue, and NullValue properties (the object values that represent true, false, and null), in the particular data type of the bound column.


public class DataGridBoolColumn : DataGridColumnStyle {

// Public Constructors

   public DataGridBoolColumn();

   public DataGridBoolColumn(System.ComponentModel.PropertyDescriptor prop);

   public DataGridBoolColumn(System.ComponentModel.PropertyDescriptor prop, bool isDefault);

// Public Instance Properties

   public bool AllowNull{set; get; }

   public object FalseValue{set; get; }

   public object NullValue{set; get; }

   public object TrueValue{set; get; }

// Protected Instance Methods

   protected internal override void Abort(int rowNum);  // overrides DataGridColumnStyle

   protected internal override bool Commit(CurrencyManager dataSource, int rowNum);  // overrides DataGridColumnStyle

   protected internal override void ConcedeFocus();  // overrides DataGridColumnStyle

   protected internal override void Edit(CurrencyManager source, int rowNum, 

        System.Drawing.Rectangle bounds, bool readOnly, string instantText, 

        bool cellIsVisible);  // overrides DataGridColumnStyle

   protected internal override void EnterNullValue();  // overrides DataGridColumnStyle protected internal override object ...

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.