Class GridCheckBoxCellInfo
Defines the class that provides a GridStyleInfoSubObject object with options to customize check-box cell type behavior in a cell.
Each property in this sub object can be configured individually. Properties that have not been initialized will inherit default values from a base style.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public class GridCheckBoxCellInfo : GridStyleInfoSubObject, ICustomTypeDescriptor, IDisposable, IStyleInfo, ISupportInitialize, IFormattable, IConvertible, IXmlSerializable, IStyleInfoSubObject
Examples
The following code changes check-box behavior for cells:
model.TableStyle.CheckBoxOptions = new GridCheckBoxCellInfo("True", "False", string.Empty, false);
model[rowIndex, 1].CheckBoxOptions.FlatLook = true;
Constructors
GridCheckBoxCellInfo()
Initializes a new instance of the GridCheckBoxCellInfo class.
Declaration
public GridCheckBoxCellInfo()
GridCheckBoxCellInfo(StyleInfoSubObjectIdentity)
Initializes a new instances of the GridCheckBoxCellInfo class and associates it with an existing GridStyleInfoSubObjectIdentity.
Declaration
public GridCheckBoxCellInfo(StyleInfoSubObjectIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A GridStyleInfoSubObjectIdentity that holds the identity for this GridCheckBoxCellInfo. |
GridCheckBoxCellInfo(StyleInfoSubObjectIdentity, GridCheckBoxCellInfoStore)
Initializes a new instances of the GridCheckBoxCellInfo class and associates it with an existing GridStyleInfoSubObjectIdentity.
Declaration
public GridCheckBoxCellInfo(StyleInfoSubObjectIdentity identity, GridCheckBoxCellInfoStore store)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoSubObjectIdentity | identity | A GridStyleInfoSubObjectIdentity that holds the identity for this GridCheckBoxCellInfo. |
GridCheckBoxCellInfoStore | store | A GridCheckBoxCellInfoStore that holds data for this GridCheckBoxCellInfo. All changes in this style object will saved in the GridCheckBoxCellInfoStore object. |
GridCheckBoxCellInfo(String, String, String, Boolean)
Initializes a new instances of the GridCellValidateValueInfo class specified with the check box options.
Declaration
public GridCheckBoxCellInfo(string checkedValue, string uncheckedValue, string indetermValue, bool flatLook)
Parameters
Type | Name | Description |
---|---|---|
System.String | checkedValue | The text value that represents checked state. |
System.String | uncheckedValue | The text value that represents unchecked state. |
System.String | indetermValue | The text value that represents indeterminate state. |
System.Boolean | flatLook | true if you want to draw flat check-box; false otherwise. |
Examples
This example shows how to use the GridCheckBoxCellInfo(String, String, String, Boolean) method.
//Scroll position based on the column index.
this.gridControl1.TableStyle.CheckBoxOptions = new GridCheckBoxCellInfo("Checked", "UnChecked", "Intermediate", true);
'Scroll position based on the column index.
Me.gridControl1.TableStyle.CheckBoxOptions = New GridCheckBoxCellInfo("Checked", "UnChecked", "Intermediate", True)
Properties
CheckedValue
Gets or sets the text value that represents the checked state.
Declaration
public string CheckedValue { get; set; }
Property Value
Type |
---|
System.String |
Default
Gets a default GridCheckBoxCellInfo to be used with a default style.
Declaration
public static GridCheckBoxCellInfo Default { get; }
Property Value
Type |
---|
GridCheckBoxCellInfo |
Remarks
The Default of the GridStyleInfo class will return the default border info that this method generates through its overridden version of GetDefaultStyle().
Default settings are:
Property | Value |
---|---|
CheckedValue | "1" |
UncheckedValue | "0" |
IndetermValue | "" |
FlatLook | true |
FlatLook
Gets or sets value indicating whether check box shall be drawn with flat-look
Declaration
public bool FlatLook { get; set; }
Property Value
Type |
---|
System.Boolean |
HasCheckedValue
Gets a value indicating whether CheckedValue property has been initialized.
Declaration
public bool HasCheckedValue { get; }
Property Value
Type |
---|
System.Boolean |
HasFlatLook
Gets a value indicating whether FlatLook property has been initialized.
Declaration
public bool HasFlatLook { get; }
Property Value
Type |
---|
System.Boolean |
HasIndetermValue
Gets a value indicating whether IndetermValue property has been initialized.
Declaration
public bool HasIndetermValue { get; }
Property Value
Type |
---|
System.Boolean |
HasUncheckedValue
Gets a value indicating whether UncheckedValue property has been initialized.
Declaration
public bool HasUncheckedValue { get; }
Property Value
Type |
---|
System.Boolean |
IndetermValue
Gets or sets the text value that represents indeterminate state.
Declaration
public string IndetermValue { get; set; }
Property Value
Type |
---|
System.String |
UncheckedValue
Gets or sets the text value that represents unchecked state.
Declaration
public string UncheckedValue { get; set; }
Property Value
Type |
---|
System.String |
Methods
GetDefaultStyle()
Overrides and returns Default
Declaration
protected override StyleInfoBase GetDefaultStyle()
Returns
Type | Description |
---|---|
StyleInfoBase | A GridCheckBoxCellInfo object with default values. |
Overrides
MakeCopy(StyleInfoBase, StyleInfoProperty)
Overrides and makes an exact copy of the current object.
Declaration
public override IStyleInfoSubObject MakeCopy(StyleInfoBase newOwner, StyleInfoProperty sip)
Parameters
Type | Name | Description |
---|---|---|
StyleInfoBase | newOwner | The new owner style object for the copied object. |
StyleInfoProperty | sip | the identifier for this object. |
Returns
Type | Description |
---|---|
IStyleInfoSubObject | A copy of current object. |
Overrides
ResetCheckedValue()
Resets the CheckedValue property
Declaration
public void ResetCheckedValue()
ResetFlatLook()
Resets the FlatLook property.
Declaration
public void ResetFlatLook()
ResetIndetermValue()
Resets the IndetermValue property.
Declaration
public void ResetIndetermValue()
ResetUncheckedValue()
Resets the UncheckedValue property.
Declaration
public void ResetUncheckedValue()