ASPxEditBase.ClientEnabled Property
Gets or sets a value that indicates whether an editor is enabled on the client.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v18.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Boolean | **true** | true if an editor is enabled; otherwise, false. |
Remarks
Use the ClientEnabled property to specify an editor’s ability to respond to end-user interactions, such as mouse clicks or text input. An editor’s availability state, defined by this property, can then be dynamically changed on the client side using the ASPxClientEditBase.SetEnabled method.
Note
The ClientEnabled property is not in effect if an editor is disabled on the server side by using the server Enabled property.
Example
The complete sample project is available in the DevExpress Code Central database at E493.
...
<dxe:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px"
ClientInstanceName="txtMain" ClientEnabled="False" Text="test message">
</dxe:ASPxTextBox>
<dxe:ASPxButton ID="ASPxButton1" runat="server" Text="Edit..." AutoPostBack="False">
<ClientSideEvents Click="function(s, e) {
txtPopup.SetText(txtMain.GetText());
popupControl.Show();
}" />
</dxe:ASPxButton>
<dxpc:ASPxPopupControl ID="ASPxPopupControl1" runat="server"
ClientInstanceName="popupControl" Height="83px" Modal="True"
CloseAction="CloseButton" Width="207px"
AllowDragging="True" PopupHorizontalAlign="WindowCenter"
PopupVerticalAlign="WindowCenter">
<ContentCollection>
<dxpc:PopupControlContentControl runat="server">
Text:<dxe:ASPxTextBox ID="ASPxTextBox2" runat="server" Width="170px"
ClientInstanceName="txtPopup">
</dxe:ASPxTextBox>
<br/><br/>
<table style="border:none">
<tr>
<td>
<dxe:ASPxButton ID="btnOK" runat="server"
AutoPostBack="False" Text="OK"
Width="80px" OnClick="btnOK_Click">
<ClientSideEvents Click="function(s, e) {
popupControl.Hide();
e.processOnServer = true;
// do some processing at the server side
}" />
</dxe:ASPxButton>
</td>
<td>
<dxe:ASPxButton ID="btnCancel" runat="server"
AutoPostBack="False"
ClientInstanceName="btnCancel"
Text="Cancel" Width="80px">
<ClientSideEvents Click="function(s, e) {
popupControl.Hide();
}" />
</dxe:ASPxButton>
</td>
</tr>
</table>
</dxpc:PopupControlContentControl>
</ContentCollection>
</dxpc:ASPxPopupControl>
...
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ClientEnabled 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.