This is a migrated thread and some comments may be shown as answers.

Get GanttViewLinkDataItem

3 Answers 10 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
HWI CHEOL
Top achievements
Rank 1
HWI CHEOL asked on 14 May 2018, 01:13 AM

Hello~

I need your help~

Can I Get GanttViewLinkDataItem from GanttViewDataItem ?

 

//current way

var links = gantt.Links.Where(x => x.StartItem = item);

// but, I think a bad way

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 14 May 2018, 11:48 AM
Hi,

The GanttViewdataItem does not expose a relation to the created links. It is possible for a Gantt data item not to have links at all. In this respect, a solution similar to the one you have posted is possible.

Let me know if you need further assistance.

Regards,
Hristo
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 14 May 2018, 11:58 PM

Thanks to your answer.

I want find link quickly.

 Let me know if you have other options

0
Hristo
Telerik team
answered on 15 May 2018, 10:12 AM
Hello,

The data items do not know about the links and this is done on purpose. Iterating the links for finding a certain start data item is a possible solution and it should not influence the performance. If you are creating the links and the data items programmatically, you can also consider using an object to store the mappings, e.g a dictionary. With the dictionary, you should be able to get a link to a data item instantly.

Regards,
Hristo
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.
Tags
GanttView
Asked by
HWI CHEOL
Top achievements
Rank 1
Answers by
Hristo
Telerik team
HWI CHEOL
Top achievements
Rank 1
Share this question
or