I found out as, probably, a large number of users, that the column header height is a read-only property.
I've been loonking for a hack around, without luck for now.
The fact is that i want to reduce the height to less than the colheaderlines=1.
i've seen this DefaultRowHeight property topic, but i can't access the header row using that.
Please let me know if there's a solution to this problem.
regards,
You cannot change the header height in the normal mode, but you can do it if you use RowLayout mode for the band.
So I understand you do
displaylayout.band[0].userowlayout = true;
but then what is the code to set the columns headers height?
I think you would have to insert a carraige return characters in to the header text to separate the words. Or maybe set WrapHeaderText to true.
I used
column.RowLayoutColumnInfo.PreferredLabelSize and resized the height.
But then, I have a column with the header: Fee Type.
I want to decrease the column header width, and so I want it to show like this:
Fee
Type
One word under the other.
But what I get is
and the other word (Type) is hidden.
Well, the easiest thing would be to do this in the grid designer and just click and drag the header to the size you want. This really only works if your grid has a data source at design-time, though, so it can get the data structure. At run-time, I think what you have to do is set column.RowLayoutColumnInfo.PreferredLabelSize for each column. Although I think if you just set the size on one and none of the others have any size assigned, they will all use the size of the one you set.