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
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.
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.