RowDetailsTemplate Sizing Issue

May 12, 2009 at 6:04 PM


I have a fairly simple DataGrid, and for styling reasons, I want it to look a particular way. So, let's say I have column A-D. Columns A-C are displayed as headers, and D, which is a long section of text, should be displayed underneath. 

For Example:

Column A Column B Column C
Value Value Value
This is some text that should span columns and will
wrap when it gets large enough.

The obvious way to handle this seemed the RowDetailsTemplate, which works quite well. What isn't working well is that no matter what I put into the RowDetailsTemplate, even if it's just a label with the word "blah" in it, the size of the Grid vertically gets larger. Quite a bit larger.

Once I reach 5 or 6 rows, the grid will now be at least 10 times the size it should have been. I have also noticed that when I change the RowDetailsTemplate to only show on selected, the grid height grows the first time the RowDetailsTemplate is shown, and doesn't revert when its closed.

Any and all help are appreciated. I'm would prefer not to abandon the DataGrid here, so I'm hoping someone can provide an answer.



May 12, 2009 at 9:25 PM

Hey aibynn,

Can you attach the xaml for your project and the RowDetailsTemplate?  That is not the standard behavior so we should be able to help once we see exactly how you're doing things.