Kendo Panel bar child right indented

1 Answer 49 Views
PanelBar
abdul
Top achievements
Rank 1
Iron
abdul asked on 09 Sep 2024, 11:13 AM

How to make the Kendo Panel Bar children as right indented.

 

For example I have PanelBar called  Interest Rates and 3 children. I want the 3 children as below right indented.

 

Interest Rates

Default Rates

Negative Carry

Cash FTP

 

Thanks

Abdul Ashad

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Tsvetomila
Telerik team
answered on 12 Sep 2024, 10:14 AM

Hi Abdul,

Thanks for reaching out.

To attain the intended result, I recommend employing the HtmlAttributes() API configuration to add an extra class "k-level-2" to the items. This way, the child item will be intended to the right.

For example:

    @(Html.Kendo().PanelBar()
        .Name("panelbar")
           // ...
                projects.Add()
                    .Text("Default Rates")
                    .HtmlAttributes(new { @class = "k-level-2" });
           // ...

Follow the Telerik REPL for ASP.NET Example to review the implementation in practice.

Furthermore, the "k-level-2" class will intend the items once,  "k-level-3" once more. If you need a more specific distance, try applying a style attribute instead:

.HtmlAttributes(new { style="margin-left:30px;"}); 

I look forward to hearing whether the solution helped achieve the desired result.

Regards,
Tsvetomila
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

abdul
Top achievements
Rank 1
Iron
commented on 12 Sep 2024, 10:29 AM

Thanks for providing the solution. It's working as expected.
Tags
PanelBar
Asked by
abdul
Top achievements
Rank 1
Iron
Answers by
Tsvetomila
Telerik team
Share this question
or