GridViewColumn is a control in WPF which separates the Grid and ListView controls with columns.
Questions tagged [gridviewcolumn]
104 questions
91
votes
13 answers
How to autosize and right-align GridViewColumn data in WPF?
How can I:
right-align the text in the ID column
make each of the columns auto size according to the text length of the cell with the longest visible data?
Here is the code:
…

Edward Tanguay
- 189,012
- 314
- 712
- 1,047
51
votes
6 answers
Where can i find the default WPF Control templates?
As per this MSDN link,
There is no way to replace only part
of the visual tree of a control; to
change the visual tree of a control
you must set the Template property of
the control to its new and complete
ControlTemplate
.
I am trying…

Manish Basantani
- 16,931
- 22
- 71
- 103
47
votes
2 answers
ListView.GridViewColumn (*) width
I am using ListView control instead of DataGrid in my WPF application. I want to give * width to my ListView.GridViewColumn, but whenever I am providing * width to ListView.GridViewColumn, it gives me a compile time error. Kindly suggest me how can…

Yogesh
- 829
- 2
- 8
- 21
32
votes
11 answers
WPF: How to hide GridViewColumn using XAML?
I have the following object in App.xaml

bh213
- 6,343
- 9
- 43
- 52
25
votes
2 answers
WPF ListView with GridViewColumn and DataTemplate
I have a CheckedListBox control which is created by adding a DataTemplate with a CheckBox to a ListView. The problem is that I need columns too.
The following code doesn't display the check boxes:

Ready Cent
- 1,821
- 3
- 18
- 25
19
votes
6 answers
C#/WPF: Make a GridViewColumn Visible=false?
Does anyone know if there is an option to hide a GridViewColumn somehow like this:
Thanks a…

Joseph jun. Melettukunnel
- 6,267
- 20
- 69
- 90
19
votes
2 answers
TextBlock text wrapping in GridViewColumn.CellTemplate not working
I am having problems getting the TextWrapping to work in this example. Can anyone see what I am duing wrong here?
…

mola
- 1,120
- 1
- 8
- 22
18
votes
1 answer
GridViewColumn content and VerticalAlignment
i want to display some information in a listview using the GridView.
i have several GridViewColumns and everything works fine.
However, want the GridViewColumns content to have a VerticalAlignment (Top in this case)
but the gridvewcolumn intself…

Joachim Kerschbaumer
- 9,695
- 7
- 49
- 84
18
votes
1 answer
DataTemplate for each DataType in a GridViewColumn CellTemplate
I have an ObservableCollection which contains view models of multiple types, and I would like to make a DataTemplate for each type within each of my GridViewColumn's CellTemplates. In this simple example I could create a base ViewModel, but I would…

scuba88
- 458
- 2
- 4
- 13
11
votes
1 answer
WPF: How to freeze a ListView header row so that it won't scroll off the screen
I am new to WPF development, I have a ListView and I want to freeze the header row so that it won't scroll off the screen when the user scrolls the list.
The xaml code, I have inherited, looks something like this:

hamishmcn
- 7,843
- 10
- 41
- 46
10
votes
5 answers
WPF: GridViewColumn resize event
I'm using ListView with GridView. Is there GridViewColumn resize event?

Marat Faskhiev
- 1,282
- 6
- 17
- 37
9
votes
2 answers
Disable GridViewColumn Resize
Is there any way by which I can disable GridViewColumn resize in WPF? I don't want to style the control.

Elmo
- 6,409
- 16
- 72
- 140
9
votes
5 answers
How to Set a gridview column width when binding to a datatable
I am binding a table to a gridview in asp.net as such
grdIssues.DataSource = mdtIssues;
grdIssues.DataBind();
The problem is I cannot then control the column width, asp.net seems to decided on it's own what width each column should be. Methods…

Bob Avallone
- 979
- 7
- 20
- 36
8
votes
1 answer
Content alignment for Gridviewcolumn in the listview
Please see the picture below
Following is the code for this ::

Pankaj Upadhyay
- 12,966
- 24
- 73
- 104
8
votes
2 answers
Access GridViewColumnHeader object from GridViewColumn
is it possible in wpf to access the header of a gridviewcolumn as gridviewcolumnheader?
I have an object:
GridViewColumn column;
But the "Header" property just returns a string (header text) not the "real" header object.
Can anyone help my?

Marco
- 543
- 3
- 9
- 21