Load & Save Sort Order

4 posts, 0 answers
  1. Derek
    Derek avatar
    6 posts
    Member since:
    Mar 2017

    Posted 02 Jun Link to this post

    Hi,
    Was wondering on how I can access the sort order of items in the list so I can save their order?

  2. Polya
    Admin
    Polya avatar
    238 posts

    Posted 07 Jun Link to this post

    Hi Derek,

    There is no built in logic for sorting the TasksSource of the RadGanttView.
    It is of type IEnumerable, thus whatever IEnumerable you choose to use will determine how the tasks are sorted. Could you provide more information of your scenario and what you wish to achieve in order for us to get a better understanding?

    Regards,
    Polya
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Derek
    Derek avatar
    6 posts
    Member since:
    Mar 2017

    Posted 07 Jun in reply to Polya Link to this post

    I'm trying to get the drag and drop reorder. So when they move an item up and down, I can get the position number.
  4. Polya
    Admin
    Polya avatar
    238 posts

    Posted 09 Jun Link to this post

    Hello Derek,

    The implementation of GanttTasks does not provide an order number out of the box. However, you can create a custom GanttTask and include additional properties that suit the needs of your application, in this case a property for the GanttTask order. You can find more information on how to create a custom GanttTask in this help article: http://docs.telerik.com/devtools/wpf/controls/radganttview/features/items/custom-gantttask

    Then you can also create a custom GanttDragDropBehavior and override its Drop method, where you can extract the dragged GanttTask, its destination GanttTask and the drop position from the state method parameter and adjust the order properties accordingly. You can find more information on how to create a custom GanttDragDropBehavior in our Custom Drag and Drop behaviors help article.

    Hope this helps.

    Regards,
    Polya
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top