[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
New request: Grid Column Headers with wrap text behaviour  XML
Forum Index -> Development
Author Message
deftereos

Power User

Joined: 05/05/2011 13:49:24
Messages: 100
Offline

Hi,

Sometimes you might have long text for a column header of a grid (eg. "Average Annual Growth Rate (%)".

My customer is asking to have the text wrap when the user resizes the column ( i.e. a behavior similar to the text-area in ArrayGrid demo sample).
Is this possible?

Regards,

Gerasimos Makis Defteraios

[MSN]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi,

the text should wrap if you pass it as HTML, <html>xxx xxx</html>. At least the wrapping is done on word level (not on character level).

Regards, Björn

Björn Müller, CaptainCasa GmbH
deftereos

Power User

Joined: 05/05/2011 13:49:24
Messages: 100
Offline

Back again, with one more...

Is it possible to adjust the height of the grid column-header row so that it will always display the complete wrap text?

Regards,

Gerasimos Makis Defteraios

[MSN]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi,
you can set the HEADLINEROWHEIGHT in the grid - which may be different to the content height defined by ROWHEIGHT.
Regards, Björn

Björn Müller, CaptainCasa GmbH
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi,

There is a drawback with the html trick: Exporting to PDF or to CSV, the html tags are visible. At least this is so with version 4_0_20120322.
Can you supress them?

Regards, Daniel
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi Patrick,

thanks for your comment!
Yes, this is possible. We can wipe out HTML tags before creating the PDF... Should be part of next update...

Regards, Björn

Björn Müller, CaptainCasa GmbH
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi,

There is here a flaw with the alignment. As soon as the text wraps, the gridcol attribute "align" is not considered anymore. That means that if attribute align="right" is set, gridcol texts that don't wrap align right, but gridcol texts that wrap align left.

I have tried to workaround with html paragraph tags align="right" and style="text-align:right" but they seem to be ineffective.

Any hints?

Regards, Daniel
[WWW]
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi Björn,

Can you reproduce the flaw described in my last posting?

Regards
Daniel
[WWW]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

...yes, the reason is that as soon as you use HTML for the alignment, then all the alignment is managed within the HTML and not from outside anymore.

So: instead of defining "<html>abc abc abc</html>" you may define "<html><p align="right">abc abc abc</p></html>".

Is this an option for you?

Regards, Björn

Björn Müller, CaptainCasa GmbH
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi,

It is a good option that I have tried again and now it works.
Thank you very much.

Regards, Daniel
[WWW]
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team