Telerik Forums
UI for ASP.NET Core Forum
1 answer
50 views
Is it possible to add a Year View or some sort of project wide scaled view to the timeline?  We often have long projects and would like to scale the timeline to show the entire project in the window both for web use and for pdf export.
Aleksandar
Telerik team
 answered on 04 Apr 2023
1 answer
100 views

I know that if set ShowWorkDays(true) only workdays will be shown and I can set WorkWeekStart and WorkWeekEnd. 

But what if I want to keep showing the weekends and still have monday as first day of the week?

Momchil
Telerik team
 answered on 03 Oct 2022
1 answer
86 views
Is there a way to display the Duration of a Task as a column on the left?
Aleksandar
Telerik team
 answered on 21 Mar 2022
1 answer
70 views
 The item data is not transferred via the hash syntax to the custom template ("tooltip-tamplate") for the tooltip. But it works for other templates "task-templat" and "column-template". Please help me to find out the solution. Below is my code in View:

            <!--Style progress bar-->
            <script id="task-template" type="text/x-kendo-template">
                <div class="template" style="background-color: #= Color #;">
                    <a href="#= Link #">
                        <h5 style="font-family: "Open Sans",sans-serif;">#= title #<\h5>
                    </a>
                </div>
            </script>

            <!--Style columns-->
            <script id="column-template" type="text/x-kendo-template">
                @*<i class="tio-bookmark-outlined tio-lg text-primary"></i>*@
                <span>#= ProjectGenre #</span>
            </script>

            <!--Style ToolTip-->
            <script id="tooltip-tamplate" type="text/x-kendo-template">
                <div style="padding: 1rem;">
                    <p>Genre: #= ProjectGenre # </p>
                </div>
            </script>

@(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>((IEnumerable<TaskViewModel>)ViewData["tasks"], (IEnumerable<DependencyViewModel>)ViewData["dependencies"])
                            .Name("gantt")
                            .Columns(columns =>
                            {
                                columns.Bound(c => c.Studio).Title("Студія").Width(200).Sortable(true);
                                columns.Bound(c => c.ProjectGenre).Title("Жанр").Width(300).Sortable(true).TemplateId("column-template");
                            })
                            .Views(views =>
                            {
                                views.YearView(yearView => yearView.Selected(true));
                            })
                            .ShowWorkHours(false)
                            .ShowWorkDays(false)
                            .Editable(false)
                            .Height(600)
                            .TaskTemplateId("task-template")
                            .DataSource(d => d
                                .Model(m =>
                                {
                                    m.Id(f => f.TaskID);
                                    m.ParentId(f => f.ParentID);
                                    m.Field(f => f.Expanded).DefaultValue(true);
                                    m.Field(f => f.Start).ToString();
                                    m.Field(f => f.End).ToString();
                                })
                            )
                            .Tooltip(t =>
                            {
                                t.Visible(true);
                                t.TemplateId("tooltip-tamplate");
                            })
                            .DependenciesDataSource(d => d
                                .Model(m =>
                                {
                                    m.Id(f => f.DependencyID);
                                    m.PredecessorId(f => f.PredecessorID);
                                    m.SuccessorId(f => f.SuccessorID);
                                })
                            )
                    )
Aleksandar
Telerik team
 answered on 20 Aug 2021
2 answers
79 views

Hello,

my problem is related to the destroy action, when called a js error is returned (see attached file), but when you call an update on another task the gantt fires the update and then the pending destroy action.

my destroy action:

[AcceptVerbs("Post")]
public ActionResult ResourcePlanningDeleteLogic([DataSourceRequest] DataSourceRequest request, ResourcePlanningViewModel ResourcePlanning)
{
    if (ResourcePlanning != null && ModelState.IsValid)
    {
        _resourcePlanningService.Deletelogic(ResourcePlanning);
    }
 
    return Json(new[] { ResourcePlanning }.ToDataSourceResult(request, ModelState));
 
}

 

my gantt:

@(Html.Kendo().Gantt<ResourcePlanningViewModel, ResourcePlanningDependencyViewModel>
    ()
    .Name("gantt")
    .Columns(columns =>
    {
        columns.Bound(c => c.Title).Title("Pianificazione").Width(150).Editable(false).Sortable(true);
        columns.Bound(c => c.Start).Format("{0: dd/MM/yyyy}").Title("Data Da").Width(50).Editable(false).Sortable(true);
        columns.Bound(c => c.End).Format("{0: dd/MM/yyyy}").Title("Data A").Width(50).Editable(false).Sortable(true);
        columns.Bound(c => c.ConsRuleHours).Title("H Reg Cons").Width(60).Editable(false).Sortable(true);
        columns.Bound(c => c.IsFrozen).Title("Congelata").Width(50).Editable(false).Sortable(false);
    })
    .Views(views =>
    {
        views.DayView();
        views.WeekView(weekView => weekView.Selected(false)).DayHeaderTemplate("#=kendo.toString(start, 'dd/MM')#");
        views.WeekView(weekView => weekView.Selected(false)).WeekHeaderTemplate("#=kendo.toString(start, 'D')# - #=kendo.toString(kendo.date.addDays(end, -1), 'D')#").Selected(true);
        views.MonthView(monthView => monthView.Selected(false).MonthHeaderTemplate("#=kendo.toString(start, 'M')#")).WeekHeaderTemplate("#=kendo.toString(start, 'dd/MM')#");
    })
    .Height(700)
    .ShowWorkHours(false)
    .ShowWorkDays(false)
    .Snap(false)
    .Toolbar(tb => tb.Pdf())
    .DataSource(d => d
        .Model(m =>
        {
            m.Id(f => f.Id);
            m.ParentId(f => f.ParentID);
            m.Field(f => f.Expanded).DefaultValue(false);
        })
        .Read(read => read.Action("ResourcePlanningRead", "ResourcePlanning"))
        .Destroy("ResourcePlanningDeleteLogic", "ResourcePlanning")
        .Update(update => update.Action("ResourcePlanningUpdate", "ResourcePlanning").Data("onUpdateCreate"))
    )
    .DependenciesDataSource(d => d
        .Model(m =>
        {
            m.Id(f => f.DependencyID);
            m.PredecessorId(f => f.PredecessorID);
            m.SuccessorId(f => f.SuccessorID);
        })
        .Read("ReadResourcePlanningDependencies", "Gantt")
    )
    .Pdf(pdf => pdf
        .FileName("Pianificazione Risorse.pdf")
        .ProxyURL(Url.Action("Pdf_Export_Save", "Gantt"))
    )
    .Editable(editable => editable.Create(false)
                                  .Resize(false)
                                  .DragPercentComplete(false)
                                  .Reorder(false)
                                  .DependencyCreate(false)
                                  .DependencyDestroy(false)
                                  .Confirmation(true)
                                  .Destroy(true)
                                  .Move(false)
                                  .TemplateId("TaskEditorTemplate")
    )
    .Messages(m => m.Save("Salva")
                    .Cancel("Annulla")
                    .Destroy("Cancella")
                    .DeleteTaskConfirmation("Sei sicuro di voler cancellare la pianificazione?")
                    .DeleteTaskWindowTitle("Cancella Pianificazione")
                    .Editor(e => e.EditorTitle("Aggiorna Pianificazione")
                                  .AssignButton("Aggiungi Regola di Consuntivazione")
                                  .ResourcesEditorTitle("Regola di Consuntivazione"))
                    .Views(v => v.Day("Giornaliera")
                                 .Week("Settimanale")
                                 .Month("Mensile"))
                    .Actions(a => a.Pdf("Esporta in PDF"))
    )
)

 

Is there maybe a data error that prevents the first call to the destroy action?

 

Plamen
Telerik team
 answered on 06 Feb 2020
1 answer
72 views

Example task "Task_A" and task "Task_B" are linked by the dependency "Finish to Start" (FS).
https://docs.telerik.com/devtools/aspnet-ajax/controls/gantt/server-side-programming/objects/dependencies

1. Your control can execute the following script:
  - if the "end date" of the task "Task_A" changes, does the "start date" of the task "Task_B" change?

Your control can execute the following script:
  - if the "end date" of the task "Task_A" changes, does the "start date" of the task "Task_B" change?

I tried to do it in the demo version. But, if I did everything right, then it does not work for me.
https://demos.telerik.com/aspnet-ajax/gantt/examples/overview/defaultcs.aspx

2. Do you have a different web control(Gantt) that can solve the problem of p. 2?

(ASP.NET AJAX, ASP.NET MVC, Blazor, PHP, JSP, Silverlight)

Peter Milchev
Telerik team
 answered on 01 Aug 2019
1 answer
184 views

How do you remove the "Add Task" button?  My Gantt chart is completely driven from database values, so I don't want my users to be able to add tasks to the Gantt, they only need to see schedule.

Thanks

Ken

Marin Bratanov
Telerik team
 answered on 11 Feb 2019
1 answer
66 views

How do you color a task to represent the percent completion?

The demo's at https://demos.telerik.com/aspnet-core/gantt/task-template and https://demos.telerik.com/aspnet-core/gantt/api show it but I couldn't tell how it was being done.  I am looking to do something like these demo's do.

Thanks

Ken

Dimitar
Telerik team
 answered on 10 Jan 2019
2 answers
109 views

Hi,

I am currently using a trial version of Kendo UI for ASPNet Core. For my application I am looking to use a Gantt like control.

I need to be able to show the Gantt displaying the Tasks that users need to complete. These are assigned to a particular place in a factory.

Would there be a way in this control to show the "assigned locations" down the left (where task id, title, start & end are in the example), and then all the tasks are displayed on the right on the correct location row; at the correct date/time etc.

Thanks

Ashley


Ashley
Top achievements
Rank 1
 answered on 04 Dec 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?