Roberto Salemi

Roberto Salemi

  • NA
  • 146
  • 137.2k

Set height datagrid as height of his stackpanel, for show ve

Feb 19 2015 12:10 PM
Hi,

I have this GRID:

    <Grid Margin="0,0,0,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="90" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
In 2° row I have:

        <StackPanel Margin="0,0,0,50" Grid.Row="1" Visibility="Hidden" Name="stackPanelSearchResult">
            <GroupBox>
                <GroupBox.Header>
                    <Label Style="{StaticResource LabelFieldset}" Content="{StaticResource menuLabelGroupBoxGrid}" />
                </GroupBox.Header>
                <DataGrid Name="dgPlan"......
                ......
                </DataGrid>
        </GroupBox>
    </StackPanel>
</Grid>
How can I set the height of datagrid as hegith of stackpanel for show verticarl scrollbar?

Thanks.

Answers (1)