Home Forums WPF controls Xceed DataGrid for WPF Problem with scrollbar inside a stack panel

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25024 |

    Hi,
    i need to put i grid on the top of a button inside a window. To do that i use a StackPanel in this way:

    <StackPanel>

    <xcdg:DataGridControl x:Name=”grid”>
    </xcdg:DataGridControl>

    <Button />
    </StackPanel>

    Filling the grid with some elements, the scroll bar, working without the stack panel, doesn’t work. What is wrong?

    thanks

    Imported from legacy forums. Posted by Matteo (had 437 views)

    Xceed Support
    Member
    Post count: 5658

    The StackPanel class is pretty evil when working with more complex controls since it will allow controls to take as much space as they want…

    In the case of the DataGridControl, this means that the Grid will take as much space as it needs to layout all of its data item…

    My suggestion is to instead use a layout sensitive panel such as the DockPanel:

    <DockPanel>
    <Button DockPanel.Dock=”Bottom” />
    <xcdg:DataGridControl />
    </DockPanel>

    Imported from legacy forums. Posted by Marcus [Xceed] (had 310 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi Marcus,
    thanks a lot. Now it working fine…

    Imported from legacy forums. Posted by Matteo (had 3261 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.