To programatically remove the top level from the time scale, complete the following:
-
Add a button control to your form above the C1GanttView control.
-
Name your button control to btnRemoveTopLevel and add the following event hander to your button control:
| Visual Basic |
Copy Code
|
Private Sub btnRemoveTopLevel_Click(sender As Object, e As EventArgs)
gv.Timescale.TopTier.Visible = False
btnAddTopLevel.Enabled = True
btnRemoveTopLevel.Enabled = False
End Sub
|
| C# |
Copy Code
|
private void btnRemoveTopLevel_Click(object sender, EventArgs e)
{
gv.Timescale.TopTier.Visible = false;
btnAddTopLevel.Enabled = true;
btnRemoveTopLevel.Enabled = false;
}
|
-
Run your project and click on the Remove Top Level from Timescale button.

- The Timescale Tier is removed from the top of the tier.

For more information on this task, see the sample HowToDoItInCode.
See Also