This is a migrated thread and some comments may be shown as answers.

Extend the appointment is not always working

3 Answers 59 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Connie asked on 28 Feb 2020, 08:36 AM

I have an issue after I drag and drop an appointment to the other resources by auto scroll down to the resource. I'm not able to extend the appointment anymore.

If I drag and drop the appointment to the resource next row to it without apply the auto scroll down. The extend the appointment is working fine.

I found that when I extend the appointment, it didn;t change the width in the div class = rsApt rsAptColor appointment-solid-line

Do you know where cause this issue?

And what script will be trigger?

You can see my attached screenshot.

3 Answers, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 02 Mar 2020, 07:53 AM

I able to find the cause of this issue "not able to extend the appointment to other days"

When drag the extend icon and click on the day cell that I want to extend to,

it will trigger the   _onResizeGripMouseMove: function(n) {
In the 
 _getResizeTargetCell: function(k) {
            var j = this._resizingState.resizeFromStart ? 10 : -10;
            var l = $telerik.getTouchEventLocation(k, "client");
            if (this.get_selectedView() == c.SchedulerViewType.TimelineView || this.get_selectedView() == c.SchedulerViewType.MonthView) {
                l.x += j;
            } else {
                l.y += j;
            var m = this._getCellFromCoordinates(l.x, l.y);
            return m;

The  var m = this._getCellFromCoordinates(l.x, l.y); return the incorrect row that I drop on.

For example 
I plan a appointment on 27 FEB 2020 where the day cell is in grid_cell_4_row_10
Then I extend this appointment to 28 FEB 2020 where the day cell is in grid_cell_5_row_10

When I drop it to the day cell 28 FEB 2020 (grid_cell_5_row_10), the return of this._getCellFromCoordinates(l.x, l.y) is grid_cell_5_row_9.

It causes the appointment cannot be extended to this day.

Note: Not all the appointment cannot be extended, some are working fine with the same piece of code.

Do you have any idea why the this._getCellFromCoordinates(l.x, l.y)  located to the wrong row?

Peter Milchev
Telerik team
answered on 03 Mar 2020, 12:44 PM

Hello Connie,

I can see that you have made modifications to the Scheduler and they might be causing the issue. 

Unfortunately, the provided information is insufficient for us to replicate the issue and investigate locally so that we can provide more accurate and specific suggestions and answers.

Would you please modify the attached project so that it replicates the issue and send it back to us in an official support thread? That would allow us to inspect it on our side more deeply. If possible, you can also provide a live URL where we can replicate and observe the behavior. 

Meanwhile, please try to remove the customizations one by one, until you manage to narrow it down to no custom code or track down the script that causes this.

Once we have a solution to this, we can share it here for convenience and better visibility from the community.

Peter Milchev
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
Top achievements
Rank 1
answered on 05 Mar 2020, 02:57 AM

I'm able to find the causes of this issue that I reported

- not able to extend the appointment to other days at the same row
- sometimes not able to drop to correct destination especially when scroll is involved. 

This is due to the height of the cell in  _initializeModelTables: function()   is different from the first time.

It will make the _getRowIndex() return the incorrect row.

For example:
First time load the planning board
The Cell height for each row is 96
When you perform any drag and drop or extend the appointment
The Cell height for some of the rows is 114

The solution that I found :
It needs to execute the $find('Scheduler').repaint(); in order to get the correct height of the cell.



Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Peter Milchev
Telerik team
Share this question