FormLayoutSettings<ModelType>.ClientVisible Property
Gets or sets a value that specifies the initial visibility state of an extension on the client.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Property Value
Type | Description |
---|---|
Boolean | true to make an extension initially displayed on the client; false to render the extension on the web page, but make it initially hidden on the client side. |
Remarks
Use the ClientVisible property to define a extension’s initial visibility state. The extension’s visibility can then be dynamically changed on the client side using the ASPxClientControlBase.SetVisible method.
Note
If an extension server’s Visible property is set to false, the extension is not rendered on the web page at all, so it can’t be manipulated on the client side.
Example
The following example illustrates how to use the ClientVisible property.
@Html.DevExpress().FormLayout(settings =>
{
settings.Name = "FL";
settings.ClientVisible = false;
settings.Items.Add(i =>
{
i.Caption = "Item1";
i.ShowCaption = DefaultBoolean.True;
i.ColumnSpan = 1;
});
settings.Items.Add(i =>
{
i.Caption = "Item2";
i.ShowCaption = DefaultBoolean.True;
i.ColumnSpan = 1;
});
}).GetHtml();
@Html.DevExpress().Button(settings =>
{
settings.Name = "Button1";
settings.Text = "Visible/Invisible";
settings.ClientSideEvents.Click = "ChangeVisibility";
}).GetHtml()