Back to Devexpress

ASPxButton.Checked Property

aspnet-devexpress-dot-web-dot-aspxbutton-014f50e8.md

latest2.7 KB
Original Source

ASPxButton.Checked Property

Gets or sets a value indicating whether the button is in the checked state.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

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

Property Value

TypeDefaultDescription
Booleanfalse

true if the button is checked; otherwise, false.

|

Remarks

The ASPxButton controls can function as radio buttons. To create a mutually exclusive set of buttons, use the ASPxButton.GroupName property to specify a group of button controls. Once the ASPxButton.GroupName property has been set, only one ASPxButton in the specified group can be checked at one time.

Use the Checked property to determine the checked status of the button editor. Changing the Checked property invokes the ASPxClientButton.CheckedChanged (ASPxButton.CheckedChanged) event.

Example

This part of the ASPxButton - Features online demo illustrates how to use a button’s ASPxButton.Checked property.

aspx
...
<dxe:ASPxButton ID="ASPxButton1" runat="server" AutoPostBack="False" Checked="True"
   GroupName="G" Text="Option 1" Width="110px">
</dxe:ASPxButton>
...
<dxe:ASPxButton ID="ASPxButton2" runat="server" AutoPostBack="False" GroupName="G"
   Text="Option 2" Width="110px">
</dxe:ASPxButton>
...
<dxe:ASPxButton ID="ASPxButton3" runat="server" AutoPostBack="False" GroupName="G"
   Text="Option 3" Width="110px">
</dxe:ASPxButton>

See Also

js-ASPxClientButton.CheckedChanged

SetChecked(value)

GetChecked

ASPxButton.CheckedChanged

GroupName

ASPxButton Class

ASPxButton Members

DevExpress.Web Namespace