Skip to content

Commit dcb0ef0

Browse files
Monika4841NatarajanSF4844
authored andcommitted
Added column chooser header text.
1 parent 62f1b11 commit dcb0ef0

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

MAUI/DataGrid/columns.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,26 @@ this.dataGrid.Columns.RemoveAt(1);
387387

388388
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.
389389

390-
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.
390+
{% tabs %}
391+
{% highlight xaml %}
392+
393+
<syncfusion:SfDataGrid x:Name="dataGrid"
394+
ItemsSource="{Binding OrdersInfo}"
395+
ShowColumnChooser="True">
396+
</syncfusion:SfDataGrid>
397+
398+
{% endhighlight %}
399+
400+
{% highlight c# %}
401+
402+
dataGrid.ShowColumnChooser = true;
403+
404+
{% endhighlight %}
405+
{% endtabs %}
406+
407+
###Column Chooser Header Text
408+
409+
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.
391410

392411
{% tabs %}
393412
{% highlight xaml %}
@@ -402,7 +421,7 @@ You can also customize the header text of the Column Chooser using the `SfDataGr
402421

403422
{% highlight c# %}
404423

405-
dataGrid.ShowColumnChooser = true;
424+
dataGrid.ColumnChooserHeaderText = "Select Visible Columns";
406425

407426
{% endhighlight %}
408427
{% endtabs %}

0 commit comments

Comments
 (0)