Scroll event in Grid

Hi everybody,

is there a way to get an scroll event or something like that for the new Grid Component?
I want to catch the event if a special row disappear after scrolling in the grid.

Best regards!

Hi,

As far as I know, there is no easy way. You’d need to add the event notification mechanism somewhere in Grid’s client-side code, and then send the information to the server. Grid’s client-side API is designed to allow customization, so there shouldn’t be huge blockers. Perhaps you could implement it with an extension, but if it is a too limited way, you’d need to extend Grid.

Perhaps making a custom renderer and some trickery would be an easier solution; perhaps by handing DOMNodeRemoved events in a renderer, when the cell in the special row is removed when it’s scrolled away. However, I’m not immediately sure at which point the rendered elements are actually removed when they are scrolled out of view, so this solution might not work exactly as it should.