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

Treelines ?

7 Answers 385 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 28 Mar 2012, 12:57 PM
Does anyone have an example or css specifiers for making the TreeView show treelines ?

Something to do with k-first, k-in, k-last perhaps

Thanks
Richard

7 Answers, 1 is accepted

Sort by
0
Adrian
Top achievements
Rank 1
answered on 30 Mar 2012, 02:10 PM
Because the padding attribute of .k-item only partial lines are possible. Not exactly what I've got in mind but maybe useful too.

#treeview .k-item  {
     border-bottom: 1px solid black;
}
 
#treeview .k-group  {
     border-top: 1px solid black;
}
 
#treeview .k-last  {
     border-bottom: none;
}
0
Francisco
Top achievements
Rank 1
answered on 31 Aug 2012, 01:28 AM
Is it possible to have a tree view with tree lines like on my attachment?
0
Alex Gyoshev
Telerik team
answered on 04 Sep 2012, 09:42 AM
Hello all,

See the following jsBin example on how to achieve this effect.

Greetings,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Francisco
Top achievements
Rank 1
answered on 04 Sep 2012, 05:08 PM
Thanks for your response, it works!

The only issue is this example is building the treeview using jquery, but the style looks like does not work if I build the treeview on my view using razor. Any idea?

In the worse case scenario I guess I can build the treeview using jquery instead but I would be nice to know how to fix the issue.

Regards!
0
Alex Gyoshev
Telerik team
answered on 05 Sep 2012, 06:59 AM
Hello Francisco,

I believe the server-side code does not render the k-treeview-lines class. The following script will add it:

    $(".k-treeview > .k-group").addClass("k-treeview-lines");

Regards,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Francisco
Top achievements
Rank 1
answered on 05 Sep 2012, 04:35 PM
Thank you so much!
0
Richard Hyde
Top achievements
Rank 1
answered on 12 Nov 2012, 05:44 PM

This solution works fine for IE 9+. Anyone got this working in IE8?
Tags
TreeView
Asked by
Richard
Top achievements
Rank 1
Answers by
Adrian
Top achievements
Rank 1
Francisco
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Richard Hyde
Top achievements
Rank 1
Share this question
or