Page 1 of 1
Set Datagrid Header alignment?
Posted: Mon Jun 03, 2013 5:15 pm
by leston12
Does anyone know how to set the text alignment for the HEADER in a datagrid table?
I see how you can set the alignment for the COLUMN using code:
set the dgColumnAlignment["<columnName>"] to "<value>"
or using the Inspector.
But have been unable to find anything in the datagrid documentation about setting the alignment of the HEADER text.
Always is set to Left.
Thanks!
Re: Set Datagrid Header alignment?
Posted: Wed Jun 05, 2013 2:17 am
by icouto
I suppose one way to do this would be to hide the 'default' headers, and create new headers manually - i.e., either using fields or buttons, depending on the functionality you want. That would have the added benefit of allowing you to
really customise the appearance and function of the header row, way beyond merely setting text alignment!
I'm curious to hear whether the 'Pros' have hidden tricks or suggestions about this, though!
Re: Set Datagrid Header alignment?
Posted: Wed Jun 05, 2013 11:44 am
by Klaus
I think this feature is really missing in the Datagrid, at least I did not find any hints on this...
Re: Set Datagrid Header alignment?
Posted: Wed Jun 05, 2013 5:02 pm
by Klaus
Hi all,
this IS in fact implemented, but missing from the docs :-/
Here is how:
...
set the dgHeaderAlignment[<yourcolumnname>]of group "yourdatagridname" to "left" ##( or center or right)
....
Best
Klaus
Re: Set Datagrid Header alignment?
Posted: Wed Jun 05, 2013 11:41 pm
by icouto
I wonder if there is a way to further customize the header - ie, change fontsize, bgcolor, margins, etc.?
Re: Set Datagrid Header alignment?
Posted: Thu Jun 06, 2013 9:53 am
by Klaus
Hi Igor,
if you are bold enough, you could dive into the x-thousand lines of the datagrid library script

Maybe you will find a hint there, nothing to find in the docs however...
Best
Klaus