SplitterSettings.ClientLayout Property

Enables you to save and restore the previously saved layout of the Splitter.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v20.1.dll

Declaration

public ASPxClientLayoutHandler ClientLayout { get; set; }
Public Property ClientLayout As ASPxClientLayoutHandler

Property Value

Type Description
ASPxClientLayoutHandler

A ASPxClientLayoutHandler method to which custom processing is delegated.

Remarks

Provide custom implementation of the delegated method to save and restore the splitter's layout from a data store.

Examples

This example demonstrates how to preserve the MVC Splitter layout when an end-user expands, collapses or resizes its panes.  The Splitter extension is placed inside the CallbackPanel extension. In order to save its layout after a modification, you are required to handle corresponding client-side events and pass layout data to the server. This data is retrieved using the GetLayoutData method and passed as a parameter via the MVCxClientCallbackPanel.PerformCallback method to the server side to the corresponding Controller Action method. Then the client layout data is applied to Splitter in the ClientLayout event handler. server event.

See Also: E3960: How to save ASPxSplitter's client-side layout after every modification of the control by an end-user

@{
    ViewBag.Title = "MVC Splitter - How to save the client layout of the control after every modification by an end-user";
}

<h2>MVC Splitter - How to save the client layout of the control after every modification by an end-user</h2>
<script>
    var timerID = -1;
    function UpdateState(s, e) {
        if (timerID == -1) {
            timerID = setTimeout(
             function () {
                 CallbackPanel.PerformCallback({ layout: Splitter.GetLayoutData() });
                 timerID = -1;
             }, 0);
        }
    }
</script>
<a href="@Url.Action("Index","Home")" target="_blank">Open page in new window</a>
@Html.Action("CallbackPanelPartial")
See Also