Ticket T896427
Visible to All Users

Gantt - How to hide visual elements to edit the information about Tasks' progress if this information is not used in an application

created 5 years ago (modified 5 years ago)

[DevExpress Support Team: CLONED FROM T895744: ASPxGantt - How to display additional columns with custom values in Tree View area]

Hello Oleg,

Is it possible to remove the tooltip we use to update the Progress of a Task?

I have attached the screenshot of what I am talking about. In the screenshot, you see a small triangle tip on the Audit1 bar which we can drag to set the progress.

My implementation does not have a progress or percentage complete.

I know it can be disabled by setting the EditingSettings to false. But I would like to edit stuff but disable dragging the tooltip for setting the Progress.

I would like to like if there is a way to disable it.

Regards,
Lokesh

Answers approved by DevExpress Support

created 5 years ago

Hello Lokesh,

At present, Task.Progress is one of the mandatory fields and we do not provide a corresponding API to hide visual elements for editing this field.

We will consider making this field optional and hide corresponding elements for editing this field in future versions.

At present, you can hide the slider within tasks using the following CSS:

CSS
.dx-gantt-task-edit-progress { display: none; }

Use a corresponding editor in the Task Dialog using the following CSS:

CSS
.dxgt-taskeditdialog .dxgt-dialogLG > div:nth-child(4) { display: none; }

Please try this and let me know your results.

    Comments (2)

      Hi Oleg,

      It works.

      Regards,
      Lokesh

        Hi Oleg,
        This solution is not working in devexpress version 21.1.4.
        Both the slider and the percentage completion is visible again.
        Can you provide a solution for this version?

        Thanks
        Olaf

        Other Answers

        created 4 years ago (modified 4 years ago)

        This is one possible solution for hiding the progress in the client tooltip and also remove the progress slider (v 21.1.14).

        C#
        gantt.ClientSideEvents.TooltipShowing = "function(s,e){" + "var tooltip = s.ganttView.taskEditController.tooltip;" + "s.ganttView.taskEditController.progressEdit.style = \"display:none\";" + "var div = document.createElement('div');" + "div.innerHTML='<div class=\"dx-gantt-task-edit-tooltip-default\"><div class=\"dx-gantt-task-title\"><span>'+ e.task.Name +'</span></div><table class=\"dx-gantt-status-time\"><tbody><tr><td>Beginn: </td><td>'+tooltip.formatDate(e.task.StartDate)+'</td></tr><tr><td>Ende: </td><td>' + tooltip.formatDate(e.task.EndDate) + '</td></tr></tbody></table></div>';" + "e.container.appendChild(div);" + "}";
          Comments (3)
          DevExpress Support Team 4 years ago

            You are right, Olaf.

            The ClientGantt.TooltipShowing event handler can be used to customize a task's tooltip and remove information about the Progress field in v21.1.4.

            To hide a corresponding slider within tasks, use the following CSS:

            Code
            CSS.dx-gantt-task-edit-progress { display: none!important; }

            To hide a corresponding editor from the Task Dialog, handle the ClientGantt.TaskEditDialogShowing event as shown below:

            C#
            Gantt.ClientSideEvents.TaskEditDialogShowing = "function (s, e) { e.hiddenFields.push(\"Progress\"); }";

            Please let me know if you require any clarification.

              Thank you Oleg,
              That solved the problem.

              DevExpress Support Team 4 years ago

                You are welcome!

                I am happy to hear that my assistance was helpful to you.

                Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

                Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.