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
160
XamDataGrid not respecting MaxHeight? (10.3)
posted

Hey there,

Just noticed that XamDataGrid seems to ignore the MaxHeight property on it's RowDefinition, it works perfectly fine with the Height property though. Why is XamDataGrid using the Height and not the ActualHeight property of the RowDefinition?

Below you'll find a small test scenario. The ScrollViewer is needed because we use it in our application. The first XamDataGrid is what we want, but doesn't seem to work. The XamDataGrid just expands behind the MaxHeight and thus loading every record in memory. The second XamDataGrid is working the way we want it to, but is using the Height property. Is there anything I can do to use the MaxHeight?

<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition MaxHeight="100" />
                </Grid.RowDefinitions>

                <igDP:XamDataGrid BindToSampleData="True" />
            </Grid>

            <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="100" />
                </Grid.RowDefinitions>

                <igDP:XamDataGrid BindToSampleData="True" />
            </Grid>
        </Grid>
</ScrollViewer>



Thanks,

Wim