-
|
I'm trying to implement infinite scroll in a DataGrid. It would be something like virtualization, loading 200 rows each time scroll is arrived to max. DataGrid exposes two events related to the scrollbars, but they only get fired when scrollbar buttons are clicked. So, it doesn't work for me. I want to detect the end of scroll using all possibilities: mouse wheel, moving scrollbars or clicking scrollbar buttons. I tried to subscribe directly to the ScrollBar events that are part of the DataGrid. To do so, I tried to find the ancestors, descendants, childrens of the DataGrid but nothing is returned. I tried also, to find the I can't extend the DataGrid control, because all the interesting properties are marked as So, I don't know what can I do. Any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
I found by myself, there is the event |
Beta Was this translation helpful? Give feedback.
-
|
https://github.com/fallenleavesguy/Avalonia.DataGrid.InfiniteScrollLoading A demo written by Claude Opus 4.5 |
Beta Was this translation helpful? Give feedback.
I found by myself, there is the event
PointerWheelChangedthat actually fires when you reach top scroll limit and bottom scroll limit.In the event arguments you can find the delta value for Y axis as 1 for top and -1 for bottom.
With these values I would be able to load the records dynamically.