10697 : Is it possible to change TimeItemLayout in runtime ?

Question

Is it possible to change TimeItemLayout in runtime ?
When I assign new layout:
                gr.Layers[0].TimeItemLayout = “Span”; nothing happens.

Answer

Yes, go like this:

gr.Layers[0][x].TimeItemLayout = Gantt.TimeItemLayouts.GetFromName(“Span”);

where x is the timeItem index you want to change.

This code gr.Layers[0].TimeItemLayout = “Span”;  changes the template used for this Layer when creating new time items.

 

10026 : Can you make a TimeItem read-only? We want to specifically block off certain areas of time by using the multilayering effect. But prevent the user resizing or moving the bottom layered timeitem.

Question

Can you make a TimeItem read-only?
We want to specifically block off certain areas of time by using the multilayering effect.  But prevent the user resizing or moving the bottom layered timeitem.

Answer

You have full control on manipulation with the TimeItemLayout. For the readonly time items you want to assign a TimeItemLayout that has set the following properties:

AllowChangeRow=false
AllowMove=false
AllowResizeEast=false
AllowResizeWest=false