Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
905
XamDataGrid Not Resizing Appropriately
posted

I'm currently trying to place a resizing XamDataGrid in the middle of a Grid layout. The problem seems to be that if I give the RowDefinition a Height of Auto, it resizes properly to the small size but when there are too many records it bumps all of the other Rows below it out of view. When I set the RowDefinition Height to *, it doesn't resize at all, which at this point is more desirable but then the Grid ends up taking up more room than it needs to, since there may only be one or two records in the Grid.

In a basic sense, this is what my grid looks like. The local:Grid view is the resizing one that bumps my border toolbar and dock manager off the page.

<Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TextBlock Grid.Row="0" Text="{Binding DisplayName}" Style="{DynamicResource MainHeaderTextBlockStyle}"/>
        <local:GridView Grid.Row="1"/>
        <Border Grid.Row="2" Style="{DynamicResource ToolBorderStyle}"/>
        <igDock:XamDockManager x:Name="DockManager" Grid.Row="3">
            <igDock:XamDockManager.Panes>
            </igDock:XamDockManager.Panes>
        </igDock:XamDockManager>
</Grid>