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

How to achieve a 'wrapping' DataGrid effect?

$
0
0

I have information that is best displayed in a tabular format or rows and columns. However, the data itself has a fair number of rows but only a few columns. Due to constraints in the layout the result is a cluster of columns on the left with a great deal of unused screen space on the right. The perfect solution would be for the data to wrap in much the same fashion as one would achieve using a ListBox that displays rows of multiple columned data using a WrapPanel as the means by which the rows of data object would be presented. While the data presented in the fashion that was desired the loss of the column header row was objected to by the people that will be using the program.

Maybe a visual of what the View looks like when using a DataGrid will better illustrate the problem and make it clearer what I'd like to accomplish.

My first attempt at this was to use a ListBox and insert the WrapPanel in it. I was able to get the columns I wanted but could not figure out how to detect when the wrap panel wrapped a new column and so could not figure out how to insert a new row header. Any ideas?


Richard Lewis Haggard


Viewing all articles
Browse latest Browse all 18858

Latest Images

Trending Articles

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