Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataGrid with different row heights does not scroll entirely to the last row #18220

Open
ChristianKargl opened this issue Feb 17, 2025 · 1 comment
Labels

Comments

@ChristianKargl
Copy link

Describe the bug

The issue occurs when not all rows have the same height when calculating the Maximum scroll value. Near the bottom a click below the thumb sets the thumb value to Maximum but the recalculation increases the Maximum. It can be seen that the thumb bar is not entirely at the bottom. Another scroll action is needed so that the thumb value is really set to the Maximum value.

To Reproduce

Compile and run the test application. The DataGrid displays 9 full rows and the 10th row is partly visible. Click the scrollbar at the bottom 5 times to scroll 5 entire pages down. Item with number 48 is partly visible on the top and item with number 57 is partly visible on the bottom.

Issue: if you do another page scroll by clicking below the scroll bar thumb then item number 59 is visible and the last item with number 60 is not fully visible.

DataGridScrollEndIssue.zip

Expected behavior

The last row with number 60 is fully visible and the scrollbar thumb is entirely on the bottom.

Avalonia version

11.1.4

OS

Windows

Additional context

No response

@ChristianKargl
Copy link
Author

Edit: I missed to set a fixed size for the main window. My tests with the attached demo app uses Height="554". This must be added to file "MainWindow.axaml". The width does not matter but should not be lower than 450 to avoid the horizontal scroll bar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant