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

Multicolumn Grid Header Aligment

3 Answers 1051 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ade
Top achievements
Rank 1
Ade asked on 11 Aug 2017, 04:27 AM

How to create Alignment of Column Text Header at Middle of merge Row

 

See Picture

3 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 14 Aug 2017, 02:17 PM
Hello Ade,

Centering the text in the header cells can be achieved with a bit of additional CSS. The CSS rule below would center the text in the header cells of the Grid.

.k-grid-header .k-grid-header-wrap th.k-header {
    text-align:center;
    vertical-align: middle;
}


Furthermore, you can see the CSS in action in the following dojo example:




Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
oreops
Top achievements
Rank 1
Iron
commented on 09 Nov 2024, 04:09 AM

We tried the above example but the alignment was not happening. Refer the screenshot attached. Support us to understand the issue. (we are using 2024.3.1015)
Martin
Telerik team
commented on 11 Nov 2024, 11:55 AM

Hello, 

From what I can see you are using our Multi Column Headers Demo, where the columns are properly aligned. Could you please let me know if I am missing something to reproduce the issue?

 

oreops
Top achievements
Rank 1
Iron
commented on 12 Nov 2024, 04:57 AM

I need to apply center alignment for the Column Header. So I gone through the sample provided above. But in the sample also , the column header text coming in left alignment only. It should come in center as per instruction. Kindly tell me what I am missing? (I shared the screenshot for your reference, which i taken from the sample dojo)
Martin
Telerik team
commented on 13 Nov 2024, 12:39 PM

You can try the style below. Here's a small example for reference.

 <style>
      .k-table-th{
        justify-content: center !important;
      }
      </style>

 

0
Ade
Top achievements
Rank 1
answered on 15 Aug 2017, 03:23 AM

Thank You ... 

I understand that Kendo UI uses css style model

 

0
oreops
Top achievements
Rank 1
Iron
answered on 08 Nov 2024, 02:24 AM
We tried the above example but the alignment was not happening. Refer the screenshot attached. Support us to understand the issue. (we are using 2024.3.1015)
Tags
Grid
Asked by
Ade
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Ade
Top achievements
Rank 1
oreops
Top achievements
Rank 1
Iron
Share this question
or