Skip to main content
A newer version of this page is available. .

ASPxClientGridView.HideCustomizationWindow Method

Declaration

HideCustomizationWindow(): void

Remarks

To show the customization window, use the ASPxClientGridView.ShowCustomizationWindow method.

Example

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