Get start and end datetime from GanttViewSummaryElement

3 posts, 0 answers
  1. HWI CHEOL
    HWI CHEOL avatar
    8 posts
    Member since:
    Mar 2018

    Posted 14 Mar 2018 Link to this post

    hi~

    radGanttView1.GanttViewElement.DragDropService.PriviewDragStart += DragDropService_PreviewDragStart;

     

    private void DragDropService_PreviewDragStart(object sender , PreviewDragStartEventArgs e)

    {

           GanttViewSummaryElement element = e.DragInstance as GanttViewSummaryElement;

           if(element  != null)

           {

                  // Get Start and End

            }

    }

  2. Dimitar
    Admin
    Dimitar avatar
    2903 posts

    Posted 15 Mar 2018 Link to this post

    Hello,

    The following code shows how you can get the data item:
    private void DragDropService_PreviewDragStart(object sender, PreviewDragStartEventArgs e)
    {
        var element = e.DragInstance as GanttViewSummaryElement;
        if (element != null)
        {
            var parent = element.Parent as GanttGraphicalViewBaseItemElement;
            var data = parent.Data as GanttViewDataItem;
            Console.WriteLine(data.Start);
            Console.WriteLine(data.End);
        }
    }

    Should you have any other questions do not hesitate to ask.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. HWI CHEOL
    HWI CHEOL avatar
    8 posts
    Member since:
    Mar 2018

    Posted 15 Mar 2018 in reply to Dimitar Link to this post

    Dimitar,  Thanks for your answer

     

Back to Top