Styling Data Grid column header text

Forum to discuss the new web client version of Servoy.

Styling Data Grid column header text

Postby huber » Fri May 14, 2021 11:29 am

I am trying to style, more precisely, to right align the header text for a column in a Data Grid, with no success. There is the headerStyleClass property, but whatever I tried, right aligning the column header text does not work.

Thanks for a hint.

Servoy Developer version: 2020.03.1

Regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 405
Joined: Mon May 14, 2012 11:31 pm

Re: Styling Data Grid column header text

Postby rph » Fri May 14, 2021 2:04 pm

Hi Robert

I've set "headerStyleClass" to "align-right" and this works!

Have also a look at "https://github.com/Servoy/svyThemeRoller/wiki#css-theme-classes" under "Tables"!

Upps. I see that this CSS-Class gets into Servoy with 2020.06 and you use 2020.03.1.

So here's what you have to put into your CSS instead:

Code: Select all
.ag-table .ag-table-header.align-right .ag-header-cell-label, .ag-table.ag-theme-servoy .ag-cell.align-right {
    justify-content: flex-end;
    text-align: initial;
}




Best
Roland
rph
 
Posts: 51
Joined: Wed Aug 10, 2011 11:44 am
Location: Cham, Switzerland

Re: Styling Data Grid column header text

Postby huber » Tue May 18, 2021 8:42 am

Hi Roland

Your solution works like a charm, thanks a lot. That was exactly what I was looking for. Also thanks for the link, very useful.

Best regards,
Robert Huber
7r AG, Switzerland
SAN Developer
http://www.seven-r.ch
User avatar
huber
 
Posts: 405
Joined: Mon May 14, 2012 11:31 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 1 guest