WPF DataGrid inside Accordion height issue
- by LucasS
I am using the latest WPF Toolkit but am running into a height issue when I have a large record set bound into a datagrid inside an AccordionItem item. The height of the Accordion itself scales nicely but the datagrid inside the accordion control doesn't get get a scrollbar or get constrained in any way so the records are hidden.
I know that I am most probably missing something very simple (like a binding from the datagrid's height property to the Accordion but that seems messy)
here is a cut down version of the code (and yes, this has the same problem if you bind in a big recordset)
...
</layouttoolkit:AccordionItem>
<layouttoolkit:AccordionItem Header="grid 2">
<dg:DataGrid
AutoGenerateColumns="False"
CanUserAddRows="False"
CanUserDeleteRows="False"
SelectionMode="Single">
...
</dg:DataGrid.Columns>
</dg:DataGrid>
</layouttoolkit:AccordionItem>
<layouttoolkit:AccordionItem Header="grid 3">
<dg:DataGrid
AutoGenerateColumns="False"
CanUserAddRows="False"
CanUserDeleteRows="False"
SelectionMode="Single">
...
</dg:DataGrid.Columns>
</dg:DataGrid>
</layouttoolkit:AccordionItem>
</layouttoolkit:Accordion>
</UserControl>