Appointment get disappears while dropping it outside the ScheduleView

8 posts, 0 answers
  1. Pushpendra
    Pushpendra avatar
    32 posts
    Member since:
    Nov 2012

    Posted 18 Mar 2013 Link to this post

    Hi

    I have placed ScheduleView in one RadPane and some other controls in another RadPane. Now I am able to drag and drop the Appointment to another RadPane or even on the border of the RadPane. After dropping the Appointment it removes from the ScheduleView but appears nowhere in the screen.
    I have also created CustomDragDropBehaviour but while dropping the Appointment outside the ScheduleView the Drop event is not firing. Please let me know how I can restrict to drop the Appointment outside the ScheduleView.
    Please check the attached code and image for reference.

    <Grid x:Name="LayoutRoot" Background="White">
            <telerik:RadDocking AllowUnsafeMode="True">
                <telerik:RadDocking.DocumentHost>
                    <telerik:RadSplitContainer Orientation="Vertical">
                        <telerik:RadPaneGroup>
                            <telerik:RadPane Visibility="Collapsed" IsPinned="True" CanUserPin="True" CanFloat="False" CanUserClose="False" CanDockInDocumentHost="False">
                                <scheduleView:RadScheduleView AppointmentsSource="{Binding Appointments,Mode=OneWay}">
                                    <scheduleView:RadScheduleView.ViewDefinitions>
                                        <scheduleView:WeekViewDefinition MinorTickLength="1h" MajorTickLength="1h" TimerulerMajorTickStringFormat="{}{0:HH:mm}" TimerulerMinorTickStringFormat="{}{0:HH:mm}" 
                                                       DayStartTime="{Binding ElementName=LayoutRoot, Path=DataContext.DayStartTime}" DayEndTime="{Binding ElementName=LayoutRoot, Path=DataContext.DayEndTime}">
                                        </scheduleView:WeekViewDefinition>
                                        <scheduleView:MonthViewDefinition />
                                    </scheduleView:RadScheduleView.ViewDefinitions>
                                </scheduleView:RadScheduleView>
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                          
                        <telerik:RadPaneGroup>
                            <telerik:RadPane Visibility="Collapsed" IsPinned="True" CanUserPin="True" CanFloat="False" CanUserClose="False" CanDockInDocumentHost="False">
                                <TextBlock Text="Another RadPane Area." />
                            </telerik:RadPane>
                        </telerik:RadPaneGroup>
                    </telerik:RadSplitContainer>
                </telerik:RadDocking.DocumentHost>
            </telerik:RadDocking>
        </Grid>

    Thanks,
    Pushpendra
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 22 Mar 2013 Link to this post

    Hi Pushpendra,

    Dropping the appointment outside the ScheduleView is not supposed to remove it from the AppointmentsSource. I have tried the provided code, but I didn't manage to reproduce this behavior. Could you please tell us which version of the controls you are using?

    Regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Pushpendra
    Pushpendra avatar
    32 posts
    Member since:
    Nov 2012

    Posted 22 Mar 2013 Link to this post

    Hi Yana,

    Thanks for the reply. We are using RadControls for Silverlight version "Q2 2011 SP1" with Silverlight 4.0. However I am able to manage the solution by setting AllowDrop="False" to all RadPaneGroup controls. Please let me know if there is any other perfect solution for this issue and you are able to reproduce the same or not.

    Thanks,
    Pushpendra
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 26 Mar 2013 Link to this post

    Hello Pushpendra,

    You are using too old version of RadControls, I have tested the case with the latest Q1 2013 release. However, the solution you've found seems good enough.

    Regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Pushpendra
    Pushpendra avatar
    32 posts
    Member since:
    Nov 2012

    Posted 28 Mar 2013 Link to this post

    Thanks Yana.
  7. Petteri
    Petteri avatar
    1 posts
    Member since:
    Apr 2013

    Posted 19 Apr 2013 Link to this post

    I have this same problem with the trial version of RadControls for WPF Q1 2013. I have exactly the same situation: RadScheduleView inside a RadDocking panel. I can drag&drop appointments to any place outside the RadScheduleView area and they disappear. I tried to set the AllowDrop properties of controls to false and it helped a little but didn't fix the whole case. I still can drop appointments to some wrong places.

    By the way: that 'Format Code Block' button doesn't work for me. It doesn't do anything (Firefox 20.0.1). However, here is a code sample.

    <telerik:RadDocking x:Name="scheduleDocking">
                    <telerik:RadDocking.DocumentHost>
                        <telerik:RadSplitContainer>
                            <telerik:RadPaneGroup x:Name="scheduleGroup">
                                <telerik:RadPane x:Name="schedulePane" Header="Schedule" AllowDrop="False">
                                    <src:ScheduleControl x:Name="scheduleControl"/>
                                </telerik:RadPane>
                            </telerik:RadPaneGroup>
                        </telerik:RadSplitContainer>
                    </telerik:RadDocking.DocumentHost>
                </telerik:RadDocking>

    Inside the ScheduleControl I have the RadScheduleView and some other stuff (see the pictures).

    Then, another problem. I'm not sure if has anything to do with this drag&drop problem, but I put it here now.

    I have implemented a custom DataConverter (for RadListBox) and ScheduleViewDragDropBehavior (for RadScheduleView) exactly the same way than shown in the demo of ScheduleView (Drag and Drop example). Visual Studio 2012 gives errors "The specified value cannot be assigned. The following type was expected: "DataConverter"." and "The specified value cannot be assigned. The following type was expected: "ScheduleViewDragDropBehavior"." Despite the errors, the application can be run and drag&droping works. The problem is that the errors break the code designer in Visual Studio.

    EDIT: Ok, this latter Visual Studio problem seems to get fixed when I added a reference to Telerik.Windows.Controls.Data assembly to my project. The drag&drop problem still exist.

    Regards,
    Petteri
  8. DGIMBERT
    DGIMBERT avatar
    3 posts
    Member since:
    Sep 2012

    Posted 19 Apr 2013 Link to this post

    Hello,
    I'm just migrating to VS2012 and on first build everything was OK. But once I change something in the XAML of the scheduleview control, I get the same kind of errors:
    Erreur 1 La valeur spécifiée ne peut pas être attribuée. Le type suivant était attendu : "ScheduleViewDragDropBehavior". 
    Erreur 2 La valeur spécifiée ne peut pas être attribuée. Le type suivant était attendu : "AppointmentSelectionBehavior". 
    Erreur 3 La valeur spécifiée ne peut pas être attribuée. Le type suivant était attendu : "ScheduleViewDataTemplateSelector".
    Erreur 4 La valeur spécifiée ne peut pas être attribuée. Le type suivant était attendu : "ScheduleViewStyleSelector"
    I remove my modifications, but VS2012 still display the errors. (The excecution still works fine)

    I'm working with Q1 2012 SP1. And I never that error on VS2010. Is the issue to that Problem?

    best regards,
    Alex.
  9. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 24 Apr 2013 Link to this post

    Hello Alex,

    We're not aware of such issues, is it possible to open a support ticket and send us an example there? Thanks

    Kind regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
DevCraft banner