[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Update FIXGRID with multiline TEXTPANES  XML
Forum Index -> Development
Author Message
phuber

Power User
[Avatar]

Joined: 06/08/2010 14:10:58
Messages: 50
Offline

Dear Community

I have a FIXGRID which have TEXTPANES with multiple lines (\n) in. Now some TEXTPANES got additional lines. To ensure that all lines (\n) are visible, I want to change my row heights afterwards. The method setRowHeight() works well initially, but not afterwards. How can I do something like updateRowHeight()?

Thanks and with best regards
PATRICK
CaptainCasa

Power User
[Avatar]

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

Hi,

the FIXGRID is not really perfectly made for lines with altering row heights, to be honest.

You could use ROWDYNAMICCONTENT and assemble the page dynamically, so that you do not have a grid anymore but just some page (compare to long hTML page that your create for certain data - now you assemble the page structure via ROWDYNAMICCONTENTBinding).

Maybe LONGTEXTFIELD is also an option for you? It is quite smart to be used inside grids.?

Regards, Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

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

...Example from the demo workplace for ROWDYNAMICCONTENT:

General => Dynamic Layout => Dynamic Form

....LONTEXTFIELD:

Components => Straight Controls => Field Control => Long Text Popup

Regards, Björn

Björn Müller, CaptainCasa GmbH
phuber

Power User
[Avatar]

Joined: 06/08/2010 14:10:58
Messages: 50
Offline

Servus Björn

Thanks for your fast reply and the possible workarounds. I am sure that I will find a solution

With best regards; PATRICK
phuber

Power User
[Avatar]

Joined: 06/08/2010 14:10:58
Messages: 50
Offline

I solved it as follows ...

Code:
       // Calculate and set new row height
       int anzahlZeilen = m_gridPostenItemEingabe.getRechnungspnormal()
       .getBezeichnung().split("\n").length;
       m_gridPostenItemEingabe.setRowHeight(anzahlZeilen * 16);
       // Remember row index
       int index = m_gridPostenBinding.getItems().indexOf(
       m_gridPostenBinding.getSelectedItem());
       // Remove row by index
       m_gridPostenBinding.getItems().remove(index);
       // Add the row again
       m_gridPostenBinding.getItems().add(index, m_gridPostenItemEingabe);
 


... works fine for me.
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team