Set days/hours locked

7 posts, 0 answers
  1. Aldo
    Aldo avatar
    39 posts
    Member since:
    Feb 2011

    Posted 14 May 2015 Link to this post

    Is it possible to set some time/day slots as locked, so that tasks cannot be put inside those slots?

    Thanks

  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 19 May 2015 Link to this post

    Hello Aldo,

    Thank you for contacting us.

    In order to achieve the described "not allowed to drop into" spots in the control's TimeRuler you could take advantage of a custom DragDropBehavior. More details about customizing the DragDropBehavior of the RadGanttView control can be found in our online documentation here. What you could do is:
    • Create a custom drag and drop behavior by creating a class that inherits the telerik GanttDragDropBehavior class
    • Override its CanDrop method
    • In that method add implementation that will return False when the state.DestinationSlot is considered not allowed
    You can find a runnable sample project of the described approach named "NotAllowedTargetDropSlots" in our online SDK repository located at GitHub. Hope this is helpful.


    Regards,
    Vladi
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Aldo
    Aldo avatar
    39 posts
    Member since:
    Feb 2011

    Posted 04 Aug 2015 in reply to Vladi Link to this post

    Hi, this solution can be a way, but we need to display not allowed slots, them should be rendered to give a visual impact to our users
  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 07 Aug 2015 Link to this post

    Hi Aldo,

    In order to achieve the visual effect of the "not allowed slots" you can take advantage of the controls TimeLineVisualizationBehavior. This behavior is responsive for the rendering of all the elements in the TimeLine of the control. You can take a look at our "Baseline" SDK example which demonstrates how to create a custom TimeLineVisualizationBehavior in order to render static transparent containers in the TimeLine of the control.

    The combination of the previously discussed SDK example and this one should yield the desired functionality.

    Regards,
    Vladi
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  6. Aldo
    Aldo avatar
    39 posts
    Member since:
    Feb 2011

    Posted 11 Aug 2015 in reply to Vladi Link to this post

    We're trying to reproduce your sample, but we  got an exception in your code (copy-pasted)

    As you can see in the screenshot we got a "An unhandled exception of type 'System.ArgumentException' occurred in Telerik.Windows.Controls.GanttView.dll", "Additional information: Not supported item type."

    The unsupported item type is {Telerik.Windows.Controls.Scheduling.TickInfo}

  7. Aldo
    Aldo avatar
    39 posts
    Member since:
    Feb 2011

    Posted 11 Aug 2015 in reply to Aldo Link to this post

    The problem could be in the target framework : your sample targeting FX 4 mine 4.5.2

    I changed target framework on your github sample, updated references to .45 Telerik .dll and now your sample raise the same exception
  8. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 13 Aug 2015 Link to this post

    Hi Aldo,

    We are not aware of such issues in the current version of the RadGnattView control.

    Changing the targeted framework version of a project that refers the required assemblies for the RadGanttView control from .NET 4.0/4.5 to .NET 4.5.2 works as expected. I recorded a short video for you showing how the described scenario runs on our side. You can find the video file attached to my last response. If we have missed something please let us know.

    Could you share with us more details about the environment in which the mentioned "ArgumentException" is being thrown. What is the:
    • OS version
    • .NET Framework version (has the 4. version been installed or the latest one is the 4.5.2)
    • The MS Visual Studio opening the project
    • Or any other related information yo think could be useful

    In the meanwhile could you try to reproduce the discussed issue on a different machine? Looking forward to your response.

    Regards,
    Vladi
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WPF is Visual Studio 2017 Ready