diff --git a/MAUI/DataGrid/Images/columns/maui-datagrid-columnchooser.png b/MAUI/DataGrid/Images/columns/maui-datagrid-columnchooser.png new file mode 100644 index 0000000000..77b1929c52 Binary files /dev/null and b/MAUI/DataGrid/Images/columns/maui-datagrid-columnchooser.png differ diff --git a/MAUI/DataGrid/columns.md b/MAUI/DataGrid/columns.md index 0e66f3ad39..9a95ed7c3e 100644 --- a/MAUI/DataGrid/columns.md +++ b/MAUI/DataGrid/columns.md @@ -383,5 +383,48 @@ this.dataGrid.Columns.RemoveAt(1); {% endhighlight %} {% endtabs %} +##Column Chooser +SfDataGrid allows you show or hide columns at runtime by selecting or deselecting them through the Column Chooser. You can enable this feature by setting the `SfDataGrid.ShowColumnChooser` property. + +{% tabs %} +{% highlight xaml %} + + + + +{% endhighlight %} + +{% highlight c# %} + +dataGrid.ShowColumnChooser = true; + +{% endhighlight %} +{% endtabs %} + +###Column Chooser Header Text + +You can also customize the header text of the Column Chooser using the `SfDataGrid.ColumnChooserHeaderText` property. By default, `SfDataGrid.ColumnChooserHeaderText` property is set to `string.Empty`, so the header is not displayed. If you assign any non-empty string, the header becomes visible. + +{% tabs %} +{% highlight xaml %} + + + + +{% endhighlight %} + +{% highlight c# %} + +dataGrid.ColumnChooserHeaderText = "Select Visible Columns"; + +{% endhighlight %} +{% endtabs %} + +Maui DataGrid Column Chooser