Author |
Message |
04/02/2013 11:51:04
|
phuber
Power User
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
|
|
|
04/02/2013 11:58:23
|
CaptainCasa
Power User
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 |
|
|
04/02/2013 12:01:22
|
CaptainCasa
Power User
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 |
|
|
04/02/2013 12:14:25
|
phuber
Power User
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
|
|
|
04/02/2013 16:29:31
|
phuber
Power User
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.
|
|
|
|