Questions tagged [gridviewcolumn]

GridViewColumn is a control in WPF which separates the Grid and ListView controls with columns.

104 questions
2
votes
3 answers

In wpf treeview, how to redraw the nodes with their previous expanded values(using MVVM)

I am developing a wpf desktop app with strict MVVM pattern. Current my app is doing following things: Showing a Treeview with HierarchicalDataTemplate. User can expand or collapse Nodes. User can add add new Nodes(Drag n Drop + double…
Sant
  • 21
  • 1
  • 2
2
votes
2 answers

ListView GridViewColumn visibility affecting because of custom style

I have applied the following style on my ListView. But this Style is causing my GridView to hide its headers row. If I remove this style from the ListView. The headers row is seen. How should I tweak this style to display the headers row?
Lucifer
  • 2,317
  • 9
  • 43
  • 67
2
votes
1 answer

Hide some values in XAML GridViewColumn if they met a condition

I have a GridView with some elements binded to my object. The value where I'm working is this: lastEdit is a DateTime type, but…
HypeZ
  • 4,017
  • 3
  • 19
  • 34
2
votes
4 answers

Get GridViewColumn Header value from ListView?

I have this XAML code
alexlz
  • 618
  • 1
  • 10
  • 24
2
votes
1 answer

Why is FindAncestor binding not working in GridViewColumn?

I'm trying to create my own GridViewColumn and having some issus with binding. Can someone explain to me why the following Header-binding does work
Florian Gl
  • 5,984
  • 2
  • 17
  • 30
2
votes
1 answer

Programmatically replace GridView cell contents on load

I am working on a program in WPF for the first time. I have a ListView in GridView mode displaying data from a bound dataset (which is grabbed from a database). In my database, "date of birth" is not a required field. As such, any record without a…
Jared Harley
  • 8,219
  • 4
  • 39
  • 48
2
votes
3 answers

Bind GridViewComboBoxColumn Datasource programmatically

On a WinForms application with C# I'm using RadGridView control of Telerik company. One of the columns of this RadGridView is of type GridViewComboBoxColumn. I want to give this column a DataSource populated at runtime and then set the three…
Mahdi Tahsildari
  • 13,065
  • 14
  • 55
  • 94
2
votes
1 answer

getvalue from FrameworkElementFactory

Am having a list view with one GridViewColumn GridViewColumn gvc = new GridViewColumn(); DataTemplate dt = new DataTemplate(); FrameworkElementFactory ch = new FrameworkElementFactory(typeof(CheckBox)); Binding…
S3ddi9
  • 2,121
  • 2
  • 20
  • 34
2
votes
1 answer

Keyboard access for GridViewColumnHeaders?

A ListView requirement we have is that the column headers be accessible by keyboard, which doesn't happen with the default ListView. For example:
dex3703
  • 2,077
  • 4
  • 28
  • 45
2
votes
1 answer

Styling GridViewColumns

I was browsing stackoverflow to try to figure out a way to style the GridViewColumns in my ListView. I came across this: WPF Text Formatting in GridViewColumn The top answer shows how to style one (1) GridViewColumn. My question is, is there a way…
Stylzs05
  • 491
  • 2
  • 8
  • 19
1
vote
1 answer

Getting rid of the white line at the end of GridViewColumnHeader in xaml

I've had several problems with the GridViewColumnHeaders so far. Originally I had a issue with there being a tiny sliver of white between each of the column headers. Even if we set the borderthickness to 0, the white lines would still exist. After…
Jay
  • 2,225
  • 3
  • 15
  • 22
1
vote
1 answer

Creating editable GridviewColumn with DataTempülate

I have an observable collection bound to my ListView via its ItemsSource property. I use a GridView to present the items in the ListView. By setting the "IsServiceMode" property to "true" in my ViewModel (DataContext to UserControl that houses the…
DaQookie
  • 31
  • 4
1
vote
3 answers

Problem with getting a cell value OnRowCommand in Gridview

protected void GridView1_OnRowCommand(object sender, GridViewCommandEventArgs e) { int index = Convert.ToInt32(e.CommandArgument); GridViewRow row = GridView1.Rows[index]; k = row.Cells[0].ToString(); …
Naresh
  • 657
  • 3
  • 16
  • 35
1
vote
1 answer

Is there a way to set the width of a GridViewColumn to Auto?

Somewhere in code I have to set the width of a GridViewColumn to 0, and in another place I want to set it to "Auto" just like in the xaml, instead of reinventing what the xaml is doing when using "Auto". Any ideas on how to do this in code?
Joan Venge
  • 315,713
  • 212
  • 479
  • 689
1
vote
1 answer

How to hide a GridViewColumn as if it's collapsed at runtime in WPF?

Basically I have some CheckBox controls I want to use to show or hide certain GridViewColumns at runtime. But I failed to find a sort of IsVisible property that I can set to false. Or even a Visibility property that exist only on…
Joan Venge
  • 315,713
  • 212
  • 479
  • 689