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

Client side binding: Treeview not showing

13 Answers 80 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Aleksander
Top achievements
Rank 1
Aleksander asked on 27 Oct 2014, 08:39 AM
Hi,

I'm having an issue with treeview not displaying any items due to the .rgtTreelistContent is being rendered with style='height: 0'. 
See attachement for html.

13 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 30 Oct 2014, 07:26 AM
Hi,

In a simple case of a RadGantt on a page this issue is not observed, as can be seen in our online demos:
http://demos.telerik.com/aspnet-ajax/gantt/examples/overview/defaultcs.aspx

The issue seems to be caused by some specific aspect of your setup, so we would need more information on how exactly you've created your Gantt control.

Regards,
Bozhidar
Telerik
0
Aleksander
Top achievements
Rank 1
answered on 31 Oct 2014, 08:03 AM
It is hosted in an aspx page that is hosted inside an iFrame.

<table class="tfb" cellspacing="1" cellpadding="0" border="0">
<tr>
<td>
<telerik:RadGantt runat="server" ID="RadGantt1" >
<WebServiceSettings Path="webApiPathGantt" />
</telerik:RadGantt>
</td>
</tr>
</table>

Any other info you require?
0
Bozhidar
Telerik team
answered on 03 Nov 2014, 07:17 AM
Hi,

The Gantt controls uses javascript to resize it's inner tables depending on the available outer container on initial load. It seems that in your case when the Gantt is initially loaded, the container is not fully expanded or visible. Try calling the following method after the control is fully loaded, to force it to recalculate it's dimensions:
$find("RadGantt1")._widget.resize();


Regards,
Bozhidar
Telerik
0
Aleksander
Top achievements
Rank 1
answered on 04 Nov 2014, 12:22 PM
That didnt work. 
I had to wrap it in a timeout for find to even get the controller.

Even a high timeout to ensure resize happens after fetch of items didnt help.

 $(document).ready(function () {
        setTimeout(function() {
            var object = $find("<%= RadGantt1.ClientID %>");
            console.log(object);
            object._widget.resize();
        }, 1500);
    });
0
Bozhidar
Telerik team
answered on 06 Nov 2014, 07:23 AM
Hello,

Could you send a simplified runnable version of your code, so that we can test it locally, as we are not able to reproduce the issue.

Regards,
Bozhidar
Telerik
0
Aleksander
Top achievements
Rank 1
answered on 10 Nov 2014, 03:14 PM
I'm sorry but I cannot send a full runnable issue. I am not able to reproduce our whole environment easily. And I am not able to reproduce it in this fashion in a side project. I was able to show the treeview partially when I noticed the radscript was only setup in our login form and not our index form (which houses all our iframes). Currently it now looks like the attached image once loaded.

I was able to reproduce a rather wierd behavior in iframes though. The height doesnt scale well with iframes that start hidden and then are loaded dynamically. (where can I send the project zip file?)
0
Aleksander
Top achievements
Rank 1
answered on 10 Nov 2014, 03:15 PM
Missed attachment:
0
Aleksander
Top achievements
Rank 1
answered on 10 Nov 2014, 03:47 PM
Added html screenshot:
0
Accepted
Bozhidar
Telerik team
answered on 11 Nov 2014, 07:38 AM
Hello,

Could you share what version of the controls you are using? In the latest version (Q3 2014) there were some fixes ot the $find("RadGantt1")._widget.resize(); I proposed earlier, which might be what's missing in your case. 

Regards,
Bozhidar
Telerik
0
Aleksander
Top achievements
Rank 1
answered on 11 Nov 2014, 07:41 AM
Im currently on 2014 Q2. Will try to upgrade. 

I do have an issue with $find("RadGantt1")._widget.resize(); in that _widget is null on document load and is not set untill data is loaded, and I have no way of knowing when that has happened (other than using a fixed timer and that is not good enough)
0
Bozhidar
Telerik team
answered on 13 Nov 2014, 09:14 AM
Hello,

You mentioned your Gantt is located inside an iFrame. If that is the case, place the code on the page containing the Gantt, that way when the document load event hits (for the page with the gantt), the widget will be initialized.

Regards,
Bozhidar
Telerik
0
Aleksander
Top achievements
Rank 1
answered on 13 Nov 2014, 11:33 AM
Updating to the Q3 release seems to solve all these issues in one go without having to do anything custom. Thank you :)

Will there be coming more client side hooks?
Fes manual triggering reloading items from server.

Im looking to creating some limitations on search dates in the page using the Gantt and then I need to reload all data. Would be nice to be able to do this without doing a full postback of the page. (WebForms)
0
Bozhidar
Telerik team
answered on 14 Nov 2014, 07:55 AM
Hello,

I'm glad the issue was resolved for you. We will continue to develop and improve the Gantt control, so keep track of our release notes for any additions to its functionality. Since the issue from this forum post was resolved, I am going to mark it as closed.

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