Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

how do I add a static extra header row to a listview?

$
0
0

I have a listview which I am using to display a small amount of gridviewcolumns. I am trying to figure out a way to add an extra header row to my listview above the standard header row which contains the field names.

 

I would like to do this because it provides a visual grouping of the fields which are related to one another. For example, my first two fields provide a status and Id number on what I call a "work unit". I'd like to have a "work unit Info" label above these two columns. The 3rd field through the 9th field are all related to a phase of a warehouse process so i'd like to have the label over them display "phase 1". The remaining fields are part of "phase 2".

At a quick glance this arrangement of information with the labels above allows me to display the same info I would normally need 3 individual grids for in one easy to view place for my floor workers.

In the winforms world on 3rd party grid packages they call this extra header row a "band" (well, at least DevXpress does).

Can anyone suggest a way for me to get the same functionality? I was hoping for a way to modify the template for the header area so that I didn't have to use 3 individual labels with no margin and a bunch of bindings to actualwidth on the columns inside the grid to handle the resizing as the grid grows.  All of that just seems like a lot of work for a simple addition such as this so I figured I would post here (and on S.O.) to get suggestions for an easier method of getting the same result.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>