When DataGrid is not set to a height, dynamically adding rows will not widen the height #16022
Unanswered
mfkwgizhoujian
asked this question in
Q&A
Replies: 4 comments
-
<StackPanel>
<Button Content="Add"/>
<DataGrid ScrollViewer.VerticalScrollBarVisibility="Disabled">
</DataGrid>
</StackPanel> For next , open the discussion before open the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Maybe there's a problem with your theme. With the fluent theme it seems to work. eg: TAGrid.zip |
Beta Was this translation helpful? Give feedback.
0 replies
-
DataGrid needs fixed height to work as inteneded. StackPanel doesn't provide it. Either set height on your own or use a Grid or DockPanel. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
When I was using DataGrid, I did not set the height, and the set for initializing the binding was empty. By clicking the button to add rows, there was data in the set, but it did not expand the height of the DataGrid, which led me to think that there was a problem with the binding at one point.
To Reproduce
Expected behavior
When dynamically adding data, if the height of the DataGrid is not set, it should automatically expand to display the latest data
Avalonia version
11.0.10
OS
Windows, macOS
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions