Filtering TimeLine sections on the client

Hi, I am currently evaluating Scheduler.NET and I’m currently in trouble to filter the visible sections of the timeline view. As I found here: viewtopic.php?f=6&t=34314
DHTMLX Scheduler offers the serverList feature, which seems to be a way to achieve this.

Unfortunately it seems that I need to define the y-Axis on the server:
TimelineUnit section = new TimelineUnit(…);
timeline.AddOption(section);

which doenst allow me to use a named serverList. That’s why i cannot access the List to modify it and the function updateCollection(…) isn’t helpful here either. Am I missing something?

As I generate several TimeLine Views I don’t want to switch to client-side configuration because that’s what Scheduler.NET is made for, right?

I would really appreciate any help, as this would be an essential feature :frowning:

Okay, for now I found out, that Scheduler.NET offers the possibility to define a Serverlist like this:

timeline.ServerList = “sections”;

although I insert the serverlist like this

[code] scheduler.serverList(“section”, [{
key: “production”, label: “Production Department”, children: [
{ key: “1”, label: “Managers” },
{ key: “2”, label: “Linda Brown” },
{ key: “3”, label: “George Lucas” }]
},

    {
        key: "sales", label: "Sales and Marketing", children: [
           { key: "3", label: "Kate Moss" },
           { key: "4", label: "Dian Fossey" }
        ]
    }]);

[/code]

I cannot get the y-Axis to display at all, any advices?

Hi,
usually you use a scheduler.serverList only when you declare views and lightbox controls (or when you want to retreive a collection).
When you inserting new values, you need to use scheduler.updateCollection instead
docs.dhtmlx.com/scheduler/api__s … ction.html

please attach your demo project, I’ll try to run it locally and check the issue with loading of section.

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 :frowning: :

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?

Hello,
you can upload the demo project somewhere and send me a private message with a download link