Scroll to a certain position in a flex scroll container or scroll to a certain row in a segment?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

So i want to create an UI where on clicking of a certain row of segment ( or a part of scroll container ) that part snaps to the top of the page . Any idea on how to implement this ?

Hi,

If you want to scroll to 1st row of your segment onclick of any row in segment. Please call below code snippet in segment onRowClick event.

this.view.<segmentId>.selectedRowIndex = [0,0];

Hi,

I dont think it is working for me. Also, i want the row ( which is clicked) to snap to the top of the page.

Thanks,

@Rose Butlew​ , May I know what the UI structure? Like if the segment is inside a flex scroll container then selectedRowIndex would not work. You can try the setContentOffset property of the flex scroll widget.