Thanks, unfortunately I thought I need a named ServerList to use the updateCollection method?
It works if i declare:
Controller:
foreach (var projekt in projekte)
{
TimelineUnit section = new TimelineUnit("projekt_" + projekt.ProjektId.ToString(), projekt.ProjektName, true);
timeline.AddOption(section);
section.AddOptions(anlagen.Where(a => a.ProjektId == projekt.ProjektId));
}
In the generated HTML I can see, that the
“y_unit”: is filled with this array
[{"children":[{"label":"Anlage 14",
"key":"14"},{"label":"Anlage 16",
"key":"16"},{"label":"Anlage 2",
"key":"2"},{"label":"Anlage 8",
"key":"8"}],
"label":"Projekt 1",
"key":"projekt_1",
"open":"1"},{"children":
…
Is there a way to update this y_unit array with update collection?
What’s not working:
Controller:
//Initialize ServerList Index()
scheduler.BeforeInit.Add("initServerLists();");
//Define in TimelineView
timelineFourWeek.ServerList = "AnzuzeigendeProjekteAnlagen";
HTML Tells:
"y_unit":scheduler.serverList("AnzuzeigendeProjekteAnlagen")
If I manually define the serverList with the y-properties before calling the render of the calendar @Html.Raw(Model.Render() in the View I can use updateCollection via JS which seems to work by trying with the alert functoin, but still no sections are displayed :
function initServerLists() {
scheduler.serverList("AlleProjekteAnlagen");
scheduler.serverList("AnzuzeigendeProjekteAnlagen",
[{
"children": [{
"label": "Anlage 14",
"key": "14"
}, {
"label": "Anlage 8",
"key": "8"
}],
"label": "Projekt 1",
"key": "projekt_1",
"open": "1"
}, { "children": .....
};
is it possible to send you the project without sharing it with everyone?