Gantt - Current Time Marker

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

This demo demonstrates the Current Time Marker available in RadGantt. It is a vertical line indicating the current time relative to the project. You can control it by setting the ShowCurrentTimeMarker property, the default value of which is true. You can also set the CurrentTimeMarkerInterval property to specify the interval after which the time marker is updated in milliseconds.

  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.GanttExamples.DataBinding.ServerSide.XMLProvider.DefaultCS" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />

    <div class="demo-container no-bg">
        <telerik:RadGantt RenderMode="Lightweight" ID="RadGantt1" runat="server" ReadOnly="true" Height="450px" AutoGenerateColumns="false"
            ShowFullTime="true" SelectedView="WeekView" ShowCurrentTimeMarker="true" CurrentTimeMarkerInterval="5000">
            <Columns>
                <telerik:GanttBoundColumn DataField="ID" HeaderText="ID" Width="40px"></telerik:GanttBoundColumn>
                <telerik:GanttBoundColumn DataField="Title" HeaderText="Title"></telerik:GanttBoundColumn>
            </Columns>
            <DataBindings>
                <TasksDataBindings IdField="ID" TitleField="Subject" StartField="Start" EndField="End" OrderIdField="ID"
                    ParentIdField="ParentID" SummaryField="Summary" PercentCompleteField="PercentComplete" />
                <DependenciesDataBindings IdField="ID" PredecessorIdField="PredecessorID"
                    SuccessorIdField="SuccessorID" TypeField="Type" />
            </DataBindings>
        </telerik:RadGantt>
    </div>

    </form>
</body>
</html>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?