RadiantQ jQuery Gantt Package
Round To Options
Previous Topic  Next Topic 

Round To Options

By default, the gantt allows the end user to specify times down to seconds. This is often undesirable, you might only want the end-user to specify times in days, half-days, hours, etc. The gantt exposes a property that allows you to specify this "round up" settings:


In HTML

$('#container').FlexyGantt({

DataSource: self.jsonData,

RoundTimeEditsTo: RadiantQ.Gantt.RoundToOptions.Day,

....

....

}


In ASP.NET MVC

@Html.JQFlexyGantt(

    new JQFlexyGanttSettings()

    {

        ControlId = "gantt_container",

        AfterGanttWidgetInitializedCallback = "AfterGanttWidgetInitializedCallback",

        DataSourceUrl = new Uri("/Home/GetFlexyGanttItemSource", UriKind.RelativeOrAbsolute),

        Options = new FlexyGanttOptions()

        {

            RoundTimeEditsTo = RoundToOptions.Day

        }

    }

)



In ASP.NET

<RQ:FlexyGantt runat="server" ID="gantt" Height="500" RoundTimeEditsTo="day" ... />

The other round to options available are:

Auto, // currently uses 15 min rounding

FifteenMinutes,

ThirtyMinutes,

Hour,

Day,

HalfDay


This round up setting is enforced when the end-user tries to resize the length of a task, edit the times of a task, etc.

This is illustrated in this samples:

In HTML                : ..\Samples\RoundsTimesToDay.htm.

In ASP.NET MVC     : ..\Views\Home\ProjectGantt\RoundsTimesToDay.cshtml.

In ASP.NET            : ..\Samples\ProjectGantt\RoundsTimesToDay.aspx.


© RadiantQ 2022. All Rights Reserved.