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

Not show expand/collapse icon in sharepoint webpart

6 Answers 158 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Thai
Top achievements
Rank 1
Thai asked on 03 Jan 2012, 05:12 AM
Hi,

I am creating a sharepoint webpart using kendo treeview, but the expand/collapse icons are not showed although the link to file sprite.png is correct. 

You can see it in the attached file.

What is the problem? Have anyone successfully used kendo treeview in sharepoint?

Thanks.
Thai

6 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 03 Jan 2012, 09:58 AM
Hi,

 Most probably the CSS files required by the treeview are not loaded. Did you register them?

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Thai
Top achievements
Rank 1
answered on 03 Jan 2012, 02:44 PM
Hi,

I already registered them in OnPreRender event.

I registered those files:
<link href='../_layouts/TreeView/styles/kendo.common.min.css' rel='stylesheet'/>
<link href='../_layouts/TreeView/styles/kendo.default.min.css' rel='stylesheet'/>
<script src='../_layouts/TreeView/js/jquery.min.js'></script>
<script src='../_layouts/TreeView/js/kendo.core.min.js'></script>
<script src='../_layouts/TreeView/js/kendo.fx.min.js'></script>
<script src='../_layouts/TreeView/js/kendo.treeview.min.js'></script>
<script src='../_layouts/TreeView/js/kendo.splitter.min.js'></script>
<script src='../_layouts/TreeView/js/kendo.resizable.min.js'></script>
<script src='../_layouts/TreeView/js/kendo.draganddrop.min.js'></script> 

and the treeview is:
treeview = $('#treeview').kendoTreeView({
                    dataSource: [
                                { text: 'Item 1', expanded: true, items: [
                                    { text: 'Item 1.1' },
                                    { text: 'Item 1.2' },
                                    { text: 'Item 1.3' }
                                ] },
                                { text: 'Item 2', items: [
                                    { text: 'Item 2.1' },
                                    { text: 'Item 2.2' },
                                    { text: 'Item 2.3' }
                                ] },
                                { text: 'Item 3' }
                            ],
                    expand: onExpand,
                    select: onSelect
                }).data('kendoTreeView');

The path is correct and the treeview still has event onSelect..

Regards,
Thai
0
Accepted
Atanas Korchev
Telerik team
answered on 03 Jan 2012, 03:42 PM
Hello,

 You need to check whether all resources are correctly served. Check with a HTTP sniffer tool such as Fiddler or FireBug to see if there are any 404 (Not Found) requests. For some reason the images are not correctly served (as is probably the CSS file itself).

All the best,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Thai
Top achievements
Rank 1
answered on 04 Jan 2012, 02:38 AM
Hi,

I checked with fiddler and found some 404 requests to kendo css files. I had fixed the problem, and it is good now.

Thank you very much :)
Thai
0
Thai
Top achievements
Rank 1
answered on 04 Jan 2012, 02:52 AM
Hi,

One more question,

Currently, all treeview on the same page will have the same style. But I want to specify each treeview with each different style.
How can I do that?

Thanks.
Thai
0
Kamen Bundev
Telerik team
answered on 05 Jan 2012, 11:01 AM
Hello Thai,

Kendo skins are intended to be used separately. However, you can edit the skin stylesheets and prefix all the rules with the different TreeView container IDs or classes, thus limiting their application to the contents.

Kind regards,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Thai
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Thai
Top achievements
Rank 1
Kamen Bundev
Telerik team
Share this question
or