This is a migrated thread and some comments may be shown as answers.
Get start and end datetime from GanttViewSummaryElement
2 Answers 10 Views
This is a migrated thread and some comments may be shown as answers.
HWI CHEOL
Top achievements
Rank 1
HWI CHEOL asked on 15 Mar 2018, 01:31 AM

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 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 15 Mar 2018, 08:57 AM
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.
0
HWI CHEOL
Top achievements
Rank 1
answered on 16 Mar 2018, 03:01 AM

Dimitar,  Thanks for your answer

 

Asked by
HWI CHEOL
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
HWI CHEOL
Top achievements
Rank 1
Share this question
or