A dropdown editor to edit boolean values.
Namespace: Dapfor.Net.EditorsAssembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)
Syntax
C# |
---|
public class BoolEditor : DropDownEditor |
Visual Basic |
---|
Public Class BoolEditor Inherits DropDownEditor |
Visual C++ |
---|
public ref class BoolEditor : public DropDownEditor |
F# |
---|
type BoolEditor = class inherit DropDownEditor end |
Examples
Demonstrates how to declare the CheckBoxEditor to edit values in Cells
Copy | |
---|---|
//Some data object with boolean Properties public class Product { private bool active; private bool tradable; //Declare the CheckBoxEditor for this property. Each Grid will use this editor to edit values in cells [Editor(typeof(CheckBoxEditor), typeof(UITypeEditor))] public bool Active { get { return active; } set { active = value; } } //The CheckBoxEditor may be declared in the Column public bool Tradable { get { return tradable; } set { tradable = value; } } } //Initialize the grid public void AddDataObjectToGrid(Grid grid) { //Configure the headers grid.Headers.Add(new Header()); grid.Headers[0].Add(new Column("Active")); grid.Headers[0].Add(new Column("Tradable")); grid.Headers[0]["Active"].Editable = true; grid.Headers[0]["Tradable"].Editable = true; //Declare the editor only for the current grid grid.Headers[0]["Tradable"].Editor = new CheckBoxEditor(); //Add a data object grid.Rows.Add(new Product()); } |
Inheritance Hierarchy
System..::..Object
System.Drawing.Design..::..UITypeEditor
Dapfor.Net.Editors..::..UITypeEditorEx
Dapfor.Net.Editors..::..DropDownEditor
Dapfor.Net.Editors..::..BoolEditor
System.Drawing.Design..::..UITypeEditor
Dapfor.Net.Editors..::..UITypeEditorEx
Dapfor.Net.Editors..::..DropDownEditor
Dapfor.Net.Editors..::..BoolEditor