Back to Devexpress

ASPxCheckBox.Checked Property

aspnet-devexpress-dot-web-dot-aspxcheckbox.md

latest5.8 KB
Original Source

ASPxCheckBox.Checked Property

Gets or sets a value that specifies whether the check box editor is checked.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(false)]
public virtual bool Checked { get; set; }
vb
<DefaultValue(False)>
Public Overridable Property Checked As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if the check box is checked; otherwise, false.

|

Remarks

Use the Checked property to specify the checked status of the check box editor. Changing the Checked property initializes the ASPxEdit.Value property with the corresponding value. This value is specified via the ASPxCheckBox.ValueChecked or ASPxCheckBox.ValueUnchecked property.

Note that the Checked and ASPxCheckBox.CheckState properties synchronize their values. The image below demonstrates the correspondence between property values.

Example

The following section of the online demo illustrates how to use the ASPxCheckBox ‘s ASPxCheckBox.Checked property.

aspx
...
<dxe:ASPxCheckBox ID="chbShowProgressPanel" runat="server" AutoPostBack="true" 
Checked="True" Text="ShowProgressPanel">
...

The following code snippets (auto-collected from DevExpress Examples) contain references to the Checked property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

asp-net-web-forms-scheduler-custom-adaptive-form-using-templates/CS/WebApplication1/CustomCommands/CustomAppointmentSaveCallbackCommand.cs#L22

csharp
if(chkRecurrence != null) {
    return chkRecurrence.Checked;
}

web-forms-pivot-grid-change-summary-display-mode/CS/SummaryDisplayMode/Default.aspx.cs#L44

csharp
if(SourceDataField != null)
    cbShowRawValues.Checked = SourceDataField.Visible;
ConfigureSummaryDisplayTypeComboBox(SelectedGroup);

web-forms-pivot-grid-calculate-running-totals/CS/RunningTotal/Default.aspx.cs#L10

csharp
DataSourceColumnBinding dsBinding = new DataSourceColumnBinding("ProductAmount");
if(cbRunningTotals.Checked) {
    var criteria = cbAllowCrossGroupRunningTotals.Checked ?

asp-net-web-forms-scheduler-custom-adaptive-form-using-templates/VB/WebApplication1/CustomCommands/CustomAppointmentSaveCallbackCommand.vb#L27

vb
If chkRecurrence IsNot Nothing Then
    Return chkRecurrence.Checked
End If

web-forms-pivot-grid-change-summary-display-mode/VB/SummaryDisplayMode/Default.aspx.vb#L67

vb
cbAllowCrossGroupVariation.Visible = isVariation
If SourceDataField IsNot Nothing Then cbShowRawValues.Checked = SourceDataField.Visible
ConfigureSummaryDisplayTypeComboBox(SelectedGroup)

web-forms-pivot-grid-calculate-running-totals/VB/RunningTotal/Default.aspx.vb#L13

vb
Dim dsBinding As DataSourceColumnBinding = New DataSourceColumnBinding("ProductAmount")
If cbRunningTotals.Checked Then
    Dim criteria = If(cbAllowCrossGroupRunningTotals.Checked, CalculationPartitioningCriteria.RowValue, CalculationPartitioningCriteria.RowValueAndColumnParentValue)

Implements

Checked

See Also

ValueChecked

ValueUnchecked

Check Box

ASPxCheckBox Class

ASPxCheckBox Members

DevExpress.Web Namespace