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

How to: Display Custom Content within a Column's Header Displayed within the Column Chooser

This example shows how to provide custom content within the UnitPrice column’s header when it is displayed within the Column Band Chooser. This includes the caption that identifies the hidden column, and the button that when clicked, makes the column visible.

The image below shows the result:

ColumnChooserHeaderCaption

public Window1() {
    InitializeComponent();
    grid.DataSource = new dsNwindProductsTableAdapters.ProductsTableAdapter().GetData();
}
private void Button_Click(object sender, RoutedEventArgs e) {
    grid.Columns["UnitPrice"].Visible = true;
}