full width tree-view row

1 Answer 10 Views
TreeView
Nico
Top achievements
Rank 1
Nico asked on 17 May 2024, 12:40 PM | edited on 17 May 2024, 12:42 PM

Hello,

i have a tree-view and i need the row fullsize. Look at the pictures. How can i do that? picture "aktuell" is the current layout  and picture "ziel" is the goal.

Best regards Nico

1 Answer, 1 is accepted

Sort by
0
Martin Bechev
Telerik team
answered on 20 May 2024, 11:22 AM

Hi Nico,

Thank you for the provided screenshots.

In order to achieve the desired outcome, using custom CSS is the way to go.

    .k-treeview-leaf{
        width: 100%;
        border: solid 1px;
        border-radius: 15px;
        margin-bottom: 5px;
    }

Here is an example:

https://stackblitz.com/edit/angular-o1ka3h?file=src%2Fapp%2Fapp.component.ts

Regards,
Martin Bechev
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Kendo family, check out our getting started resources
Nico
Top achievements
Rank 1
commented on 21 May 2024, 08:21 AM

Hey Martin,

thanks for your quick answer. Ive actually already tried this. But it didtn work. I uploded some screenshots. Maybe you can help me.

Best Regards

Nico

Martin Bechev
Telerik team
commented on 22 May 2024, 06:54 AM

Hi Nico,

Thank you for the provided images.

Based on the details I am not sure how the styles are applied, but verify the the ViewEncapsulation is set to None:

encapsulation: ViewEncapsulation.None,
  styles: [
    `
    .k-treeview-leaf{
        width: 100%;
        border: solid 1px;
        border-radius: 15px;
        margin-bottom: 5px;
    }
    `,
  ],

Nico
Top achievements
Rank 1
commented on 22 May 2024, 07:57 AM

This works! Thank you!!
Tags
TreeView
Asked by
Nico
Top achievements
Rank 1
Answers by
Martin Bechev
Telerik team
Share this question
or