how to make column invisible of wpf listview? (one way is to set width property to minimum lenth but that not proper solution) can anyone help me?
+1
A:
There is a pretty simple explanation of one way of doing it here.
Find and remove your column:
var temp = myGridView.Columns[0];
myGridView.Columns.RemoveAt(0);
Insert the column back in the view:
myGridView.Columns.Add(temp );
temp.Width = 0;
temp.Width = Double.NaN;
Remove it from the columns collection when you want to hide it and reinsert the column when you want to display it again.
HakonB
2009-05-05 08:37:25
A:
To hide the header of a ListView you can modify the Visibility property of the ColumnHeaderContainer by overriding the style locally.
<ListView>
<ListView.View>
<GridView>
<GridView.ColumnHeaderContainerStyle>
<Style>
<Setter Property="FrameworkElement.Visibility" Value="Collapsed"/>
</Style>
</GridView.ColumnHeaderContainerStyle>
<GridView.Columns>
...
</GridView.Columns>
</GridView>
</ListView.View>
Sauron
2009-09-08 11:42:39