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. Image for the cookie policy date

Lost scroll position after editing in timeline month view

Hi, Syncfusion Support

I have next issue and cannot find proper solution for it.

In a timeline month view if the event is close to the end of month I have to scroll to see it, or need to scroll down to needed event as there is a lot of data. After editing the event we refreshing data source and resources, looks like it causes scheduler to be re-rendered, and scroll back to initial position top left. Tried ScrollTo... method of the scheduler but it doesn't work :( May you advise what to do?
Attaching screenshot
Scrolling issue.PNG

here you can see event on October 25th, and scroll position, but after editing it gets back to top and need to scroll and find the even agan.


3 Replies

RM Ruksar Moosa Sait Syncfusion Team October 21, 2022 10:02 AM UTC

Hi Valentyn ,


We have prepared a sample to check on your query but unfortunately, we could not replicate the reported issue. Kindly try the attached sample and if the issue persists, could you please get back to us with the below additional details that help us to validate the issue further and provide the solution earlier?

  • Try to replicate the issue in the attached sample  or
  • Share with us the entire Scheduler codes or
  • Share a simple issue replicating sample if possible.


Output:

A screenshot of a computer

Description automatically generated


Regards,

Ruksar Moosa Sait


Attachment: BlazorScrollBarIssue_c3b7a9a3.zip


VH Valentyn Horobets October 21, 2022 08:30 PM UTC

Hello,

I was able to reproduce the issue in your example. Basically I added refresh resource on ActionCompleted event, in my case it's other event but it doesn't matter. Try to edit event at the bottom and the scroll back to the top after it. Also, I don't know why, but in this test project Resources on the left pane is not updating, after every action the random resource should disappear but it still there, I log to debug console which resource should disappear. In my app it work ;)


  Attached the proj




Attachment: BlazorScrollBarIssue_c3b7a9a3_9e20a448.zip


RM Ruksar Moosa Sait Syncfusion Team October 27, 2022 12:29 PM UTC

Hi Valentyn,


We have checked on your shared sample and let you know that by default, when you remove a resource and update the resource DataSource, the resource layout will be re-rendered and the scroll positions at the top. Hence if you like to remove the resource data and prevent the scroll position to set at top, we suggest you to use RemoveResource public method and remove the resources in the ActionCompleted event like the below code. Kindly try the attached sample and let us know if this has resolved your issue.


[Index.razor]

private void OnActionCompleted(ActionEventArgs<AppointmentData> args)

    {

        var resourceToRemove = (new Random().Next(1, 20));

        if (_groupData.Owners.Count >0){

            var Res = _groupData.Owners[resourceToRemove];

            ScheduleObj.RemoveResource(new List<int> { Res.Id }, "Owners");

        }    

    }


Regards,

Ruksar Moosa Sait


Attachment: BlazorScrollbarIssueResolved_4ca03724.zip

Loader.
Live Chat Icon For mobile
Up arrow icon