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

ASPxClientGridView.CustomizationWindowCloseUp Event

Fires after the Customization Window has been closed.

Declaration

CustomizationWindowCloseUp: ASPxClientEvent<ASPxClientEventHandler<ASPxClientGridView>>

Event Data

The CustomizationWindowCloseUp event handler receives an argument of the ASPxClientEventArgs type.

Examples

The example demonstrates how to move all columns from Header to Customization Window (and reverse) at once by clicking the external button. The button's state is synchronized automatically based on the state of the ASPxGridView's Columns.See Also:ASPxGridView - How to trace the process of dragging columns to Customization Window and within a Header

using System;
using DevExpress.Web.ASPxGridView;

public partial class _Default : System.Web.UI.Page {
    protected void grid_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) {
        ASPxGridView gridView = (ASPxGridView)sender;
        foreach (GridViewColumn column in gridView.Columns) {
            if (Convert.ToBoolean(hf["columnsInWindow"])) {
                if (column.Visible && column.ShowInCustomizationForm)
                    column.Visible = false;
            } else {
                if (!column.Visible && column.ShowInCustomizationForm)
                    column.Visible = true;
            }
        }
    }
    protected void grid_AfterPerformCallback(object sender, ASPxGridViewAfterPerformCallbackEventArgs e) {
        if (e.CallbackName == "COLUMNMOVE") {
            ASPxGridView gridView = (ASPxGridView)sender;
            gridView.JSProperties["cpColumnsInHeader"] = false;
            foreach (GridViewColumn column in gridView.Columns) {
                if (column.Visible && column.ShowInCustomizationForm) {
                    gridView.JSProperties["cpColumnsInHeader"] = true;
                    break;
                }
            }
        }
    }
}
See Also