Mark the task which is moved

2 posts, 1 answers
  1. Nagaraj
    Nagaraj avatar
    15 posts
    Member since:
    Jan 2015

    Posted 18 Feb 2015 Link to this post

    How can we capture drag and drop of task ?  
    Which particular task was moved,
    and also can we mark the task which is moved
  2. Answer
    Hristo avatar
    1522 posts

    Posted 20 Feb 2015 Link to this post

    Hello Nagaraj,

    Thank you for writing. 

    Regarding your first question please see your other support thread: Gantt View unable to trace drag and drop event.

    As for your second question, you could visually mark the item by subscribing to the GraphicalViewItemFormatting event and in the handler change the color of a particular item based on some condition, e.g. the value of its Tag property:
    Private Sub radGanttView1_GraphicalViewItemFormatting(sender As Object, e As GanttViewGraphicalViewItemFormattingEventArgs)
        Dim item As GanttViewDataItem = TryCast(e.Item, GanttViewDataItem)
        If item IsNot Nothing AndAlso item.Tag IsNot Nothing AndAlso item.Tag.ToString() = "Marked" Then
            e.ItemElement.TaskElement.BackColor = Color.Red
            e.ItemElement.TaskElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local)
        End If
    End Sub

    I hope this information helps. Should you have further questions please do not hesitate to write back.

    Hristo Merdjanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top