[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
t:fixgrid => showemptyrows  XML
Forum Index -> Development
Author Message
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

Hi,

I tried this new property and have a little problem with the row height.
When I understand right, you have to set the vertical scrollbar to hidden, to have the height set with rowheight?
When leaving scrollbar on auto, the height of the rows increase (screenshot), is this ok, or could I do sthg to get the standard height?
I also tried to set the rows elements explicit to height='20' but with no success.
P.S. I declare tje fixgrid in a t:rowdynamiccontent this is the xml:
Code:
xml.append("<t:fixgrid avoidroundtrips='true' dragsend='" + dragKey + "' rowdragsend='" + dragKey + "' drawoddevenrows='true' objectbinding='#{d.EntityListUI.gridList}' persistid='gridList' bordercolor='C0C0C0' borderheight='1' borderwidth='1' cellselection='true' rowheight='20' width='100%' sbvisibleamount='20' showemptyrows='false' headlinerowheight='20'>");


Markus
[Thumb - rowheight.png]
 Filename rowheight.png [Disk] Download
 Description
 Filesize 11 Kbytes
 Downloaded:  359 time(s)

[WWW]
CaptainCasa

Power User
[Avatar]

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

Hi,

no it's the horizontal scrollbar that you have to pay attention to. In the example of the demo workplace we use "horizontalscrollmode="hidden"".

Background: the sizing of the grid always takes into consideration that the content of the gird might scroll horizontally (i.e. columns do not fit in). What we want to avoid is that the grid resizes if you e.g. change column sizes.

As consequence the normal calculation of the grid is: n rows * rowheight + potential hieght of horizontal scrollbar. If then the grid sees, that no horizontal scrollbar is rquired (because the columns perfectly fit in), then the height of the grid is kept and the hieght of the scrollbar is distributed to the row heights.

If there is only a few rows, this is effect is much more visible... So you can tell the grid, that is should not have a horizontal scrollbar at all => as consequence there is no automated distribution of its height... and the rowheigh you assing really is the roqheight of each row.

I hope what I say is somehow understand-able...

Regards! Björn

PS: we sometimes think about offering a mode in which the grid behaves so that it behaves in a way that it resizes when it "sees" that a horizontal scrollbar is required. On the other hand we want to avoid screens that build up, and while building up have to internally resize themselves - which could potencially "launch" an avalanche of resizing activities...

Björn Müller, CaptainCasa GmbH
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

ok, it was just a typo I meant the horizontal scrollbar, sorry ;-)
Would it be a possible to reserve the height for the scrollbar, although it's not necessary because the columns fit, so I mean there' an empty space at the end of the grid?
A kind of combination of auto and hidden ;-)

Markus
[WWW]
CaptainCasa

Power User
[Avatar]

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

Hi,

spontanously I would say that this is a really good solution!!! - Keep the row heights stable and have (or not have) a transparent scrollbar distance below... Sorry, this idea is so simple and we on our side were thinking around the problem in more and more complexity...

We will check if there are any hidden complexities - but I strongly believe we should have this finished for next update.

Thanks + regards! Björn

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

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

Hi,

finally we did it the more complex way: the grid checks at runtime if it needs a horizontal scrollbar or not. If so, then additional vertical space is required. This means that there might be a resizing within the current page when e.g. changing column widths etc.

We believe that this is at the end the best response to the sizing-problem, so this aspect just behaves as you (+ others) expect it to work. ;-)

...is part of next update, the gird now provides a horizontal scroll mode "autowithresize" in addtion to "auto", "always", "hidden". "autowithresize" only makes sense for grids with no explicit heigh definition, otherwise it is behaving the same way as "auto".

Thanks again four your input! Björn

Björn Müller, CaptainCasa GmbH
mreich

Power User
[Avatar]

Joined: 30/01/2009 08:34:23
Messages: 750
Offline

Thank you for this quick solution!

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