/// <summary> /// Constructor of a RadioButton style cell. You must st a valid Model to use this type of cell with this constructor. /// </summary> public RadioButton() { View = Views.RadioButton.Default; AddController(Controllers.RadioButton.Default); AddController(Controllers.MouseInvalidate.Default); Editor = new Editors.EditorBase(typeof(bool)); Editor.EditableMode = SourceGrid.EditableMode.None; //used also because the space key are directly used by the controller, so must not start an edit operation Model.AddModel(new Models.RadioButton()); }
/// <summary> /// Constructor of a CheckBox style cell. You must st a valid Model to use this type of cell with this constructor. /// </summary> public CheckBox() { View = Views.CheckBox.Default; AddController(Controllers.CheckBox.Default); AddController(Controllers.MouseInvalidate.Default); //I use an editor to validate the value and also because the space key are // directly used by the controller, so must not start an edit operation but must still edit the value Editor = new Editors.EditorBase(typeof(bool)); Editor.EditableMode = SourceGrid.EditableMode.None; Model.AddModel(new Models.CheckBox()); }
/// <summary> /// Constructor of a CheckBox style cell. You must st a valid Model to use this type of cell with this constructor. /// </summary> public CheckBox() { View = Views.CheckBox.Default; AddController(Controllers.CheckBox.Default); AddController(Controllers.MouseInvalidate.Default); //I use an editor to validate the value and also because the space key are // directly used by the controller, so must not start an edit operation but must still edit the value Editor = new Editors.EditorBase(typeof(bool)); Editor.EditableMode = SourceGrid.EditableMode.None; Model.AddModel(new Models.CheckBox()); }
/// <summary> /// Construct a CellCheckBox class with caption and align checkbox in the MiddleLeft, using BehaviorModels.CheckBox.Default /// </summary> /// <param name="caption"></param> /// <param name="checkValue"></param> public CheckBox(string caption, bool? checkValue) : base(checkValue) { if (caption != null && caption.Length > 0) View = Views.CheckBox.MiddleLeftAlign; else View = Views.CheckBox.Default; Model.AddModel(new Models.CheckBox()); AddController(Controllers.CheckBox.Default); AddController(Controllers.MouseInvalidate.Default); //I use an editor to validate the value and also because the space key are // directly used by the controller, so must not start an edit operation but must still edit the value Editor = new Editors.EditorBase(typeof(bool)); Editor.EditableMode = SourceGrid.EditableMode.None; Caption = caption; }