GridViewColumn is a control in WPF which separates the Grid and ListView controls with columns.
Questions tagged [gridviewcolumn]
104 questions
7
votes
7 answers
How apply MinWidth for ListView columns in WPF in control template?
Following the answer to a similar question here, I was able to set the MinWidth on the XAML page.
What I would like to do is accomplish this in the control template for all GridViewColumn's in all ListView's.
Is this possible?
Update:
I tried a…

Elan
- 6,084
- 12
- 64
- 84
6
votes
2 answers
GridViewColumn CellTemplate Code Behind
I have a listView that I construct at run-time, i.e. the columns are not known at compile-time.
I would like to apply a DataTemplate to the cells such that the TextAlignment property is TextAlignment.Right. When creating the columns:
foreach (var…

t.smith.htc
- 203
- 1
- 3
- 12
6
votes
3 answers
WPF - How to have certain ListView items span columns?
I have a set of data that I'd like to present via a WPF ListView in this way:
Column1 Column2 Column3
--GroupName1--
Item1 part2 part3
Item2 part2 part3
--GroupName2--
Item3 part2 part3
Item4 …

PeteVasi
- 723
- 2
- 10
- 23
4
votes
2 answers
How to bind GridViewColumn's DisplayMemberBinding in code
I have a MultiColumn TreeView which uses a GridViewColumnCollection. I my situation, I don't know how many columns will be there, nor their header names. That's discovery at run time.
Hence I have need to create these columns in code and bind…

Walt Lounsbury
- 41
- 1
- 5
3
votes
2 answers
Autosize GridViewColumns programmatically by content
I want to set programmatically my GridViewColumns to autosize by content, not by header (Width = double.NaN)
I have searched for a long time and I found this problem solved with DataGridColumns, but how is this with GridViewColumns ?

Gepro
- 583
- 1
- 11
- 20
3
votes
1 answer
3
votes
1 answer
Responsive Gridview Column Headers
I am trying to add a header for each column associated with my gridview, such that when the page is wide enough to display multiple rows of items, a column header should be displayed at the top of each column and be removed if the page is shrunk so…

Michael Tweet
- 31
- 1
3
votes
1 answer
Binding WPF GridViewColumn to method with parameter
I am trying to bind GridViewColumn to a method with parameter.
My current XAML looks like this:
…

sergman
- 171
- 1
- 2
- 12
3
votes
4 answers
asp.Net GridView bind custom object with nested List
I have a List of custom object, which consist of a custom list.
class person{
string name;
int age;
List allMyFriends;
}
class friend{
string name;
string address;
}
I'trying to bind a list of these objects to a GridView and the…

derSteve
- 751
- 3
- 8
- 20
3
votes
0 answers
binding combobox inside gridview
I have a listview that holds a gridview.
I have a seperated list with Devices list.
Every device holds a list of Connectors.
every connector has a list of Tags.
every Tag has a property X.
Currently, when I choose device from the…

user1902346
- 799
- 1
- 12
- 21
2
votes
0 answers
Binding doesnt work for GridViewColumn Width property
I set an one way binding to Width property of GridViewColumn.At 1st time it gets value from binding and sets it to Width property.When source is changed it gets value from binding, but it doesnt set to Width property.What to do ?
Here is code…

Rabi
- 135
- 1
- 2
- 16
2
votes
0 answers
Resizing columns of listview on changes to collection in MVVM
This is my first time posting a question on here, so apologies in advance, if I have missed something in my question, of if I do not provide enough detail.
First of all, I have found a very similar problem described in this post, which pretty…

GittinJiggyWithIt
- 411
- 4
- 6
2
votes
1 answer
TreeListView with Columns generated and populated by ObservableCollection
Does anyone known (or even has an example) of a WPF based TreeListView that can generate its colums by databinding to the ObservableCollection of its tree items?
For example the databound model is a tree consisting of Employee instances…

bitbonk
- 48,890
- 37
- 186
- 278
2
votes
1 answer
Autosize to fit All Content
In WPF, I have the following:
The problem is that this only…

OhBeWise
- 5,350
- 3
- 32
- 60
2
votes
2 answers
How to get x:Name value runtime
I got:
private void ColumnHeaderClick(object sender, RoutedEventArgs e)
{
…

iLemming
- 34,477
- 60
- 195
- 309