forum

home / developersection / forums / fitting wpf datagrid in a grid control

Fitting WPF DataGrid in a Grid control

Anonymous User 2092 21-Sep-2013

I have a DataGrid control inside a Grid control in one of my WPF windows.

<Grid>
  <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
  </Grid.RowDefinitions>
  <SomeControl Grid.Row="0" />
  <DataGrid Grid.Row="1" VerticalScrollBarVisibility="Visible" VerticalAlignment="Stretch"/>
</Grid>

The problem is that when I add rows to the DataGrid it flows out of the containing window and its scroll bar remains inactive. How do I solve this problem and make the DataGrid's scroll bar to function correctly?


wpf wpf 
Updated on 21-Sep-2013

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By