search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Resources expanded by default??

Asked by Anonymous
6 years ago.

I want my resources expanded by default, don't want to click on (+ icon) in Tree enabled property, i already use Expanded = true.

private void LoadResources()
{
Events = new EventManager().FilteredData().AsEnumerable();

foreach (DataRow companies in new EventManager().GetCompanyForResources().Rows)
{
Resources.Add(new Resource() { Name = (string)companies["Name"], Id = Convert.ToString(companies["Id"]), Expanded = true , DynamicChildren = true});
}
DataStartField = "start";
DataEndField = "end";
DataTextField = "name";
DataIdField = "id";
DataResourceField = "resource";
}

but still, it was collapsed earlier, i want to be expanded on page load.

Answer posted by Dan Letecky [DayPilot]
6 years ago.

If you set DynamicChildren = true the Scheduler assumes that the children are not available and need to be loaded from the server (https://doc.daypilot.org/scheduler/dynamic-resource-tree-loading/). Such row will be always displayed with an "expand" icon. If you remove that property the row will be expanded on page load. This also means that you need to specify its children using Children property in LoadResources().

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.