Ticket T1282709
Visible to All Users

ScrollView: Scroll event only by user

created a day ago

Hi,
we use the DxScrollView and subscribe to the scroll-event. Is there a way to tell if the scroll event was triggered by a call to e.g. scrollToElement or by the user?

In our use case we add content to the view and automatically scroll the end to make the latest content visible. If the user scrolls away we want to supend the automatic scrolling. For this to work we have to destinguish our automatic scrolling from a user scrollen.

Thanks,
Sascha

Answers approved by DevExpress Support

created 18 hours ago

Hello Sascha,

The dxScrollView lacks an API to identify whether the scroll event is triggered programmatically or by a user. However, a flag variable can help you achieve your goal. Set this variable whenever you scroll the component programmatically, and use it in the scroll event handler to determine which action triggered the event.

Feel free to reach out if you need further assistance.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.