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

Changing height on client side

1 Answer 149 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Tomislav
Top achievements
Rank 1
Tomislav asked on 02 Dec 2014, 04:19 PM
Hi,


$("#GanttContainer").height($(window).height());

var radGantt = $find('<%= RadGantt1.ClientID %>');
radGantt.set_height($(window).height());
radGantt.set_width($(window).width());

I have this code, it executes and changes accordingly intern _height and _width property but gantt chart itself is not resizing.

1 Answer, 1 is accepted

Sort by
0
Accepted
Bozhidar
Telerik team
answered on 03 Dec 2014, 07:30 AM
Hello,

This is a bug in the client set_height() and set_width() methods, that will be fixed in the upcoming ServicePack. In the meantime you can use the following code to change the height of the control:
var $ = $telerik.$;
var gantt = $find("RadGantt1");
var targetHeight = $(window).height();
 
$(gantt.get_element()).height(targetHeight);
gantt._widget.resize();


Regards,
Bozhidar
Telerik
Tags
Gantt
Asked by
Tomislav
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or