3.2.0

return number of displayed rows

I have a grid with 500 rows. However, the size of the display is 500px so only 22 rows are displayed at a time. How do I programmatically return the number of displayed rows (22 in this case)?

Thanks,

Chris
Chris
April 24,
Well it depends on a'few' factors (i.e. if the horizontal scroll bar is showed or not), but basically by a formula:
obj.getScrollHeight() - 21 (horiz.scrll-bar height) - obj.getHeaderHeight()
divided by:
obj.getRowHeight()+1px (row separator if applyed).
coul result a difference between 2 and 4 pixels.

check also this post:
http://www.activewidgets.com/javascript.forum.13953.11/grid-shows-scrollbars-when-not.html
Carlos
April 24,
Sorry should be obj.getStyle(height') instead of obj.getScrollHeight()
April 24,
In poking through the source, I noticed it was hardcoded to 10 rows. I'll mod that function and see what happens.

Thanks!
Chris
April 24,
As an aside about modifying the source code...I'm working on a project in which the company bought aw a few months back. Or maybe more...not sure. Anyway, the person they had working on this flaked out so I got the contract and dumped myself directly in the middle of AW.

Does the license restrict modifying the code? I noticed there were some license language problems/discussions a while back.

Also, does the license allow me to use AW in different applications on the same server? This company has two different apps they're wanting written.

Thanks,
Chris
April 24,
I guess you are reffering to prefetching rows in virtual rendering mode so
see:
http://www.activewidgets.com/javascript.forum.12781.3/aw-ui-grid-virtual-rendering.html
http://www.activewidgets.com/javascript.forum.15937.3/virtual-mode-and-scroll.html

In general, many solutions/patches , enhancements and/or default behaivours fixes overrides the default by placing a duplicate (mod) into a new js/css file (loaded after) , this way you don't need to touch the main library.

for the license part (in case Alex oversee this post) you can send an e-mail to:
sales@activewidgets.com
http://www.activewidgets.com/company/
HTH
Carlos
April 24,

This topic is archived.

See also:


Back to support forum