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

Drag and drop behaves very strangley.

5 Answers 142 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
hardik
Top achievements
Rank 1
hardik asked on 02 Apr 2011, 06:51 AM
Hi,

I am facing problem with schedulerView drag and drop.If two reservations are at same time and If I drag one reservation on another at that time whole page get blank. Same thing happens when I drag the reservation in reverse that is to the header.If I drag the reservation down than no problem.

All these things are not happened when I use schedulerView control in individual application.

When I use it as custom control then it behaves strangely.

 <localControlsScheduler:ReservationScheduleView x:Name="XamlScheduleView"                                                              
                                                              Grid.Row="0"
                                                              Grid.Column="1"
                                                              ReservationCreating="XamlScheduleView_ReservationCreating"
                                                              ReservationCreated="XamlScheduleView_ReservationCreated"
                                                              ReservationDeleted="XamlScheduleView_ReservationDeleted"
                                                              ReservationDeleting="XamlScheduleView_ReservationDeleting"
                                                              ReservationEdited="XamlScheduleView_ReservationEdited"
                                                              ReservationEditing="XamlScheduleView_ReservationEditing"
                                                              ActiveViewDefinitionChanged="XamlScheduler_ActiveViewDefinitionChanged"/>


What may be the problem can you provide any information related to that? Or can you check it at your side.,?

I can't send sample application because its not possible for me.If you send sample application as per my scenario than I can compare it with my environment.
            

Thanks
Hardik

5 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 05 Apr 2011, 03:34 PM
Hi Hardik,

I've tried to reproduce the described issue but without much success. You can find attached my test project, can you please modify it with your code so that the problem is reproduced and send it back to us? Thanks

Regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
hardik
Top achievements
Rank 1
answered on 06 Apr 2011, 12:07 PM
HI Yana,

Thanks for test application. I have find some problem with this application which you can also check.

1. When first time page load at that time scrolling not working.After I select any slot or click somewhere else in scheduleView then after scrolling works.

2.Any appointment dragged outside of the scheduleView area then also that appointment is remain attached with mouse. I mean After drop the appointment outside of schedulView area then also without pressing of mouse left click appointment moves as per mouse move.

3.For drag and drop I have used dragDropManager class and its event handler. I set e.QueryResult to false so appointment drag is not allowed.Its working. But here problem is after dragging that appointment is still remain selected. (dragerror1).So when I go to weekView at that time again that selected appointment shows(dragerror2).

4.When I re-size the appointment at that time also drag reservation is called. But at that time no selected appointment so I am not able to apply any logic. How can I know appointment is dragged or re-size.

5. When I drop the appointment at that time I can get the destination in scheduler so I can do some validation  when I try to drag the appointment to the another resource in resource grouping. Is there any way to find out where the appointment is dropped.And what is the resource where appointment is dropped.

Thanks
Hardik


0
Yana
Telerik team
answered on 11 Apr 2011, 03:20 PM
Hello hardik,

Regarding your first issue - actually this is expected because RadScheduleView needs to be focused in order use its scroll.

As to the other issues with Drag and Drop - we strongly recommend to create a custom DragDropBehavior for RadScheduleView as explained here and  implement your custom logic in its methods.  Please try the approach and let us know the result.

Regards,
Yana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kotte
Top achievements
Rank 1
answered on 06 Sep 2011, 05:34 PM
Hi Yana,

DragDrop is not working when I keep the SchedulerView inside a RadPanelBar.
I even tried to create a  custom DragDropBehavior .It is firing CanStartDrag event and not firing CanDrop event.
Here is a sample code.I modified your code from 261447_scheduleViewCustomControl prject.


MainPage.xaml

 <telerik:RadPanelBar  x:Name="radPanelBar" VerticalAlignment="Stretch" Margin="0"  HorizontalAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled">
                    <telerik:RadPanelBarItem x:Name="Calendar"  HorizontalAlignment="Stretch">
                        <telerik:RadPanelBarItem.Header>
                                <TextBlock Text="Calendar" Height="16" Margin="5,0,0,0" />                   
                        </telerik:RadPanelBarItem.Header>
        <localControlsScheduler:ReservationScheduleView x:Name="XamlScheduleView" >                                                
        </localControlsScheduler:ReservationScheduleView>

        </telerik:RadPanelBarItem>
                </telerik:RadPanelBar>.


public class ReservationScheduleView :RadScheduleView
    {
        public ReservationScheduleView()
        {
            var dayViewDefinition = new DayViewDefinition();
            var monthViewDefinition = new MonthViewDefinition();
            this.ViewDefinitions.Add(dayViewDefinition);
            this.ViewDefinitions.Add(monthViewDefinition);
            var appoint = new Appointment()
            {
                Start = new DateTime(2011, 4, 5, 9, 0, 0),
                End = new DateTime(2011, 4, 5, 9, 30, 0),
                Subject = "Phone Call with Adria Zander",
            };
       
            this.AppointmentsSource = new ObservableCollection<Appointment>()
            {
                appoint
            };
        }
    }

0
Yana
Telerik team
answered on 12 Sep 2011, 02:30 PM
Hello Kotte,

I've answered to the other thread here.

Kind regards,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ScheduleView
Asked by
hardik
Top achievements
Rank 1
Answers by
Yana
Telerik team
hardik
Top achievements
Rank 1
Kotte
Top achievements
Rank 1
Share this question
or