Telerik Forums
UI for ASP.NET MVC Forum
1 answer
38 views

Hi there!


I would like to customize the header of GanttChart timeline, like 

if it is WeekView,  "2023/2" in 1st line and "1" , "8" (← it will be the first day of week) in 2nd line  or

if it is MonthlyView, "2023/Q1" in 1st line and "2", "3" (← it will be the month number like "2" means Feburay) in 2nd line.

let me know how should I customize to that.

I think that I should use "Views.MonthView.MonthHeaderTemplate" function, but I have no idea how I used it.

I found this API from this following link, but I can't get detail info because it had died.

ASP.NET MVC Gantt - API Reference - Telerik UI for ASP.NET MVC

Could you please share me if there is any link in which explaination for gantt API info, how to use or which parameter should be passed.

Eyup
Telerik team
 answered on 20 Feb 2023
0 answers
74 views

Hi, after following the guide on setting the colour of tasks on data binding, which worked great, we have noticed an issue. If we have something like the following tree

Level 1

-- Level 2

---- Level 3

---- Level 4

Level 5

Level 6

 

If level 3 and 4 have a background colour set to say purple.... its working fine, but if we collapse Level 2, Level 5 and 6 have the background colour changed to purple as Level 3 and 4 would have been.

 

From looking at the source code, Levels 5 and 6 seem to replace the details in the rows for Level 3 and 4 but don't change the styling used. What we need to do is on collapsing the level, we need to repaint the rows to refresh the styling.

 

Is there any event we can use to detect the expanding / collapsing function so i can call another function which repaints the displayed tasks? I've included 2 screenshots which demonstrate the behaviour.

James
Top achievements
Rank 1
 asked on 03 Oct 2022
0 answers
122 views
1 answer
63 views

How can I disable the users ability to "delete" a task? I still want them to be able to edit times/and properties but I simply don't want them to be able to delete items.

Ivan Danchev
Telerik team
 answered on 25 Mar 2022
1 answer
210 views

I am attempting to keep the Gantt Chart editable, but remove the ability to create new tasks/child entries.

 

I have tried adding this CSS and it did not work:

  .k-gantt-actions .k-button {
            visibility: hidden;
        }

The button still shows.

 

Any help?

Yanislav
Telerik team
 answered on 19 Jan 2022
1 answer
52 views

Hello, 

I have implemented the ASP.NET MVC Gantt into my project. I am having a slight issue when adding to the grid.

 

After adding, the entry for the Task shows a skinny bar with no text, when in fact database shows it does have text for the entry. Hovering over it shows the correct text. Picture below:

 

 

Refreshing the grid does not update it, although it appears totally correct in the database. Thanks for any help. Side question - how can I change the theme of my grid? I saw there are many theme options.

Ivan Danchev
Telerik team
 answered on 14 Jan 2022
0 answers
41 views

in Gantt-

shivaraj
Top achievements
Rank 1
 updated question on 05 Aug 2021
1 answer
68 views

Hello,

Is it possible to change the language of the header? (Ex: instead of Sun, Mon to another language), I have tried changing the CurrentThread and CurrentUIThread culture to Italian but i still get the days of the week in english, the datetime pickers on Gantt also have values in English while i want them in Italian.

Futhermore, when i create a new Task i would like to have the word "New task" in Italian, but can't find a way to change it.

Thank you.

Bilhan.

 

Bilhan
Top achievements
Rank 1
 answered on 14 Apr 2021
3 answers
553 views

Hello, I am using the Telerik  Kendo UI MVC Gantt control and want to display multiple tasks on one row.

As far as I know, this is not supported in Gantt control without doing some hacking in css and javascript. 

What I am currently trying out is to use UnderScore.Js to group my data and then adjust the vertical

displacement by setting the css top property. I am loading multiple tasks for each employee into the Gantt and 

I want to get these tasks on one line. In addition, I have to hide the rows that then will not show any data anymore.

My business requirement is to make the Gantt display more compact.

 

I am hooking into the OnDataBound client-side event of Gantt control and the code below contains commented code 
to try to patch the Gantt view. Problem now is that the adjustment does not look good aligned. The data is not aligned well,
trying to hide the rows in the Gantt control does not help. In addition, the code is way to slow as the jQuery code is far too slow. 

I got about 4-500 rows in my Gantt control. The javascript code below contains the commented code where I have tried to adjust 
the Gantt control to support Multiple tasks on a row. 

Is there any elegant and easy way to do this?

function onDataBound() {
    //debugger;
  
    var gantt = this;

    // var ganttasks = [];

    // gantt.element.find(".k-task").each(function (e) {
    //     //debugger;
    //     var taskuid = $(this).attr("data-uid");
    //     var dataItem = gantt.dataSource.getByUid(taskuid);
    //     ganttasks.push({ uid: taskuid, ganttask: dataItem });
    // });

    ////underscore js used below
    // var that = this;
    // var gantt = that;
    var ganttdatasource = $("#gantt").data('kendoGantt').dataSource.data();
    _.chain(ganttdatasource).sortBy('EmployeeName').groupBy('PrsPersonId').sortBy('start').each(function (g) {
        var gindxgantt = 0;
        var isBigona = false;
        _.each(g, function (gi) {

            if (gi.PrsPersonId === 9050) {
                //debugger;
                isBigona = true;
            }

            //debugger;
            if (_.first(g).uid === gi.uid) {
                //this is the first row in the group, start a runner indexing variable
            }
            if (_.first(g).uid !== gi.uid) {
                //This is not the first item, hide the row itself and move task in the gantt up a given set of pixels
                //debugger;
                //var ganttselector = "div[data-uid=" + gi.uid + "]:first";

                //$("[data-uid=" + gi.uid + "][class != k-task]").parent().parent().css("display", "block");
                //$("[data-uid=" + gi.uid + "][class != k-task]").parent().parent().css("height", "1px");
                //$("[data-uid=" + gi.uid + "][class != k-task]").parent().parent().first().css("background", "yellow");
                //$("[data-uid=" + gi.uid + "][class != k-task]").parent().parent().css("padding", "0px");
                //$("[data-uid=" + gi.uid + "][class != k-task]").parent().parent().css("margin", "0px");

                //var ganttverticaldisplacement = (-32 * gindxgantt) + "px";
                //$(ganttselector).css("top", ganttverticaldisplacement);
                //if (isBigona) {
                //    $(ganttselector).css("background-color", "red");
                //}
                //var ganttrowselector = "tr[data-uid=" + gi.uid + "]";
                //if (gindxgantt >= 1) {
                //    $(ganttrowselector).remove();
                //}
            }
            gindxgantt++;
        });
    });
}

Veselin Tsvetanov
Telerik team
 answered on 19 May 2020
1 answer
69 views

We are using Gantt in our project, the added tasks are using a template and we noticed that when the task progress covers the delete task button and it is not clickable anymore.

The template is similar to the one below:

<script id="task-template" type="text/x-kendo-template"
    <div class="template">
        <div class="wrapper">
            <strong class="title">#= title # </strong>
            <span class="resource">no resource assigned</span>
        </div>
        <div class="progress" style="width:#= (100 * parseFloat(percentComplete)) #%"> </div>
    </div>
</script>

 

 

I have tried to reproduce this issue in the Kendo Dojo and noticed that it is reproducible only when bootstrap 4 is used (for bootstrap 3 works fine). Here is the link to the kendo dojo where I was able to reproduce this issue: https://dojo.telerik.com/eyutamel 

Please help me get the functionality for the delete (k-task-delete) on the task.

Thank you in advance!

Aleksandar
Telerik team
 answered on 18 Mar 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?