This is a migrated thread and some comments may be shown as answers.

Redraw after changing parent display

1 Answer 124 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Cesar
Top achievements
Rank 1
Cesar asked on 29 Mar 2016, 07:03 AM

When you initialize a Gantt inside a div with "display:none", it cannot get the proper width, and it renders incorrectly.

Is there any way to redraw the gantt after make the parent visible?

 

Something like:

<script type="text/javascript">

function showAll() {
        $("#div-parent").css("display", "block");
        var gantt = $("#gantt").data("kendoGantt");
        gantt.redraw();
    }

</script>

1 Answer, 1 is accepted

Sort by
0
Accepted
Bozhidar
Telerik team
answered on 29 Mar 2016, 07:27 AM
Hi,

The kendo widgets don't have a redraw method, but you can use the resize method, which should work in your case.

Regards,
Bozhidar
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Gantt
Asked by
Cesar
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or