We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid horizontal scrollbar snaps to start

Thread ID:

Created:

Updated:

Platform:

Replies:

145899 Jul 12,2019 10:51 AM UTC Jul 15,2019 06:34 AM UTC Angular - EJ 2 1
loading
Tags: Grid
Domantas
Asked On July 12, 2019 10:51 AM UTC

Hello,

It is possible to prevent horizontal grid scrollbar to snap to start after changing filter type ?


1) Setting scroller to the end of grid, then changing filter type


2) Then after filter type change horizontal scrollbar snaps to the start


Thavasianand Sankaranarayanan [Syncfusion]
Replied On July 15, 2019 06:34 AM UTC

Hi Domantas, 

Thanks for contacting Syncfusion support. 

While changing the Grid filter settings dynamically we have refreshed the Grid header element which cause the scrollbar to set at initial position. However you can maintain the horizontal scroll position by setting the “scrollLeft” property of Grid scroll module. Please refer to the below code example and sample link for more information. 

[component.ts] 
public onChange(e: ChangeEventArgs): void { 
      var left =this.grid.scrollModule.content.scrollLeft// get the scroll position 
        this.grid.filterSettings.type = <FilterType>e.value; 
        this.grid.clearFiltering(); 
       setTimeout((e)=> {this.grid.scrollModule.content.scrollLeft = left;},25);  // setting the position 
    } 



Please get back to us if you need any further assistance on this. 

Regards, 
Thavasianand S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon