Set row height (style) for Gantt control

1 Answer 42 Views
Gantt
Matt
Top achievements
Rank 1
Iron
Matt asked on 11 Oct 2023, 06:39 PM | edited on 11 Oct 2023, 06:41 PM

I have a user requesting to change the row height (style) for a Gantt control. The user made a similar request for a TreeList and a Grid and I was able to identify the properties in css and override them with padding-block and padding-line. I tried the same for the Gantt control but those properties did not achieve the desired result.

Here is the spacing they want that I was able to set for the TreeList and Grid controls:

 

I was able to achieve that with the following css:

.k-grid-md td, .k-grid-md .k-table-td, .k-button-md {
    padding-block: 0;
    padding-inline: 0;
}

 

The k-button-md was needed to reduce the padding if there was a command button on the row.

 

Here is what the Gantt control looks like now:

 

Any suggestions on how to achieve the same on the Gantt control?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 12 Oct 2023, 08:30 AM

Matt -

The Gantt table rows have a height style that you also need to override with custom CSS to reduce their height.

However, the Gantt layout depends on the row height and reducing it will break the appearance in the TimeLine section. I am afraid that such customization is not supported.

Regards,
Dimo
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Matt
Top achievements
Rank 1
Iron
commented on 12 Oct 2023, 12:53 PM

Unfortunately some of my users don't believe it until they see it... form over function in many cases as well. What are the css classes/properties that need to be overridden?
Dimo
Telerik team
commented on 12 Oct 2023, 01:02 PM

REPL test page

On a side note, it is possible to increase the row height, whenever that's needed.

Matt
Top achievements
Rank 1
Iron
commented on 12 Oct 2023, 01:08 PM

Thank you for the code sample!
Tags
Gantt
Asked by
Matt
Top achievements
Rank 1
Iron
Answers by
Dimo
Telerik team
Share this question
or