I have a project where there is an existing DataGrid. I have a DataSet properly bound to it and can populate columns with data for the field in the DataSet they represent.
Now I am in a situation where over time some of these descriptor fields are empty, so if I explicitly show columns and then populate the user ends up seeing a sparsely populated ugly DataGrid.
Is there some way that I can remove dividers/columns and merge descript fields. For example, if User A only has his/her email field filled out, User B only has the name field filled out and User C only had phone number field filled out I would like to display something that looks like a simple list:
userA@intertubez.com
Useri S. Bee
(555) 555-1234
Is this possible? Is this done in the XAML or the codebehind?
It is possible that you can solve it like this: bind your DataSet to the ListBox and work with a DataTemplate. 🙂
MSDN DataTemplate Overview
Or you could convert your rows to string and then you get a List and then bind that to the ListBox. I think the first solution is better.