Skip to main content

ejCheckBox

Namespace: Wisej.Web.Ext.Syncfusion

Assembly: Wisej.Web.Ext.Syncfusion (4.1.0.0)

The CheckBox control allows you to check an option to perform an action. This control allows you to select true, false or an intermediate option. These CheckBoxes are supported with themes. The HTML CheckBox control is rendered as Essential JavaScript CheckBox control.

public class ejCheckBox : ejBase

Constructors​

Instance member ejCheckBox()​

Constructs a new instance of the ejCheckBox class.

Example:

The following example creates the check box and sets its caption through the options.

var checkBox = new ejCheckBox();
checkBox.Options.text = "Send me the newsletter";
checkBox.Location = new Point(20, 20);
this.Controls.Add(checkBox);

Instance member ejCheckBox(options)​

Constructs a new instance of the ejCheckBox class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a checked check box and receives the state changed by the user.

var checkBox = new ejCheckBox(new
{
text = "I accept the terms",
@checked = true
});
checkBox.Instance.onChange += new WidgetEventHandler((s, e) =>
{
bool isChecked = e.Data.isChecked;
this.buttonNext.Enabled = isChecked;
});
this.Controls.Add(checkBox);

Properties​

Instance member Text​

String: Gets or sets the text for the ejCheckBox. (Default: "")

The property reads and writes the value option of the widget, which is the value attribute of the check box element, and raises the TextChanged event every time it is assigned. The caption displayed next to the check box is defined by the text option, which is set through Options.text.

Example:

// the caption shown next to the check box.
this.checkBox1.Options.text = "Express delivery";

// the value attribute of the check box element.
this.checkBox1.Text = "express";

Implements​