Blazor DataGrid scroll event

1 Answer 110 Views
Grid
Oliver
Top achievements
Rank 1
Oliver asked on 18 Apr 2023, 11:46 AM

Hi,

I'm looking to subscribe to scrolling events in the data grid using JavaScript.

I've tried subscribing to the scroll event on the .k-grid and .k-grid-content elements, but the events don't happen

Is there a way to do this?

Thanks,

Oliver

1 Answer, 1 is accepted

Sort by
0
Svetoslav Dimitrov
Telerik team
answered on 21 Apr 2023, 07:02 AM

Hello Oliver,

I am happy to report that it is possible to use JavaScript to subscribe to the scroll event. The target element must be the k-grid-content. Here is the JavaScript I used to subscribe to the scroll event:

let targetElement = document.querySelector(".k-grid-content");

targetElement.addEventListener('scroll', (event) => {
    console.log("grid scrolling"); 
});

Regards,
Svetoslav Dimitrov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Oliver
Top achievements
Rank 1
Answers by
Svetoslav Dimitrov
Telerik team
Share this question
or