Hello Telerik team,
I have already checked older threads considering similar problems, but I still can't get it to work.
ngAfterViewInit(): void {
this.scrollDiv = document.getElementsByClassName('k-virtual-content')[0];
this.scrollDiv.addEventListener('scroll', this.onScroll);
}
public onScroll($event: any) {
this.scrollTop = $event.target.scrollTop;
}
The problem arises when I scroll to some position, then change gridData so that I end up with another set of data entries with a different scrollTop position (e.g. empty with scrollTop 0) and when I come back to the initial data (change gridData again), then I end up having the initial skip value but scrollTop of 0 instead of my old value.
So how can I utilize the scrollTop value? So far I have tried
this.scrollDiv.scrollTop = this.scrollTop;
but I don't think this one can also act as a setter. Can I open a Feature Request for a grid method that does this?
Cheers and thanks in advance!