views:

1736

answers:

2

I am using a DataGrid in Expression Blend but I just need to show only the registries and hide the ColumnHeader.

How do I do that?

+7  A: 

If you look at the properties of the DataGrid there should be a Header section, in there you set the field "Header Visibility" to None.

Or you can just modify the DataGrid xaml and add the property

HeadersVisibility="None"
Vic
A: 

This may be double posted, SO is being weird, but you can do this from code behind too.

C# code behind with a XAML datagrid named dg_Main would be:

dg_Main.HeadersVisibility = Microsoft.Windows.Controls.DataGridHeadersVisibility.None;

Doing this in code behind makes it easy to dynamically show and hide headers as needed.