The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientControlBase.GetVisible Method

Returns a value specifying whether a control is displayed.

Declaration

GetVisible(): boolean

Returns

Type Description
boolean

true, if a control is visible; otherwise, false.

Remarks

Use the GetVisible method to obtain a control's visibility state on the client. The initial client visibility state of a web control can be defined using its server ClientVisible property. Then, the control's visibility can be dynamically changed on the client side using the ASPxClientControlBase.SetVisible method.

Example

The following example illustrates how to use the GetVisible method.


<dx:ASPxFormLayout ID="ASPxFormLayout1" runat="server" Width="30%" ClientInstanceName="fl" ClientVisible="false">
    <Items>
        <dx:LayoutItem Caption="Layout Item1" ColSpan="1" ShowCaption="True">
            <LayoutItemNestedControlCollection>
                <dx:LayoutItemNestedControlContainer runat="server">
                </dx:LayoutItemNestedControlContainer>
            </LayoutItemNestedControlCollection>
        </dx:LayoutItem>
        <dx:LayoutItem Caption="Layout Item2" ColSpan="1" ShowCaption="True">
            <LayoutItemNestedControlCollection>
                <dx:LayoutItemNestedControlContainer runat="server">
                </dx:LayoutItemNestedControlContainer>
            </LayoutItemNestedControlCollection>
        </dx:LayoutItem>
    </Items>
</dx:ASPxFormLayout>

<br />
<dx:ASPxButton ID="ASPxButton1" runat="server" Text="Visible/Invisible" AutoPostBack="False">
    <ClientSideEvents Click="function(s, e) {
        fl.SetVisible(!fl.GetVisible());
    }" />
</dx:ASPxButton>
See Also