0

Stationary Grid Columns

asked 2009-07-17 17:53:58 +0800

davidhoyt gravatar image davidhoyt
45

In most other grids I've come across (e.g. the ExtJS grid), the column headers remain fixed or stationary as you scroll the grid contents. This is similar behavior to the native widgets in a typical GUI app. But it's nice to see the column headers as you're scrolling so you can easily see which column is what. If there's not some option to enable it, I can imagine how much work it would be to introduce it to the grid.

delete flag offensive retag edit

8 Replies

Sort by ยป oldest newest

answered 2009-07-17 17:54:40 +0800

davidhoyt gravatar image davidhoyt
45

Forgot the question -- how do I enable this if it's possible at all?

link publish delete flag offensive edit

answered 2009-07-21 02:17:22 +0800

iantsai gravatar image iantsai
2755 1

why not use paging?

link publish delete flag offensive edit

answered 2009-07-21 12:14:44 +0800

dastultz gravatar image dastultz
797 9

I would like to "freeze" both the column and row headers. I believe column headers work the way you would like by setting the height of the grid.

To answer iantsai, a "list" of things is fine to page through, but anything that is more like a spreadsheet in presentation is nice to scroll through.

/Daryl

link publish delete flag offensive edit

answered 2009-07-21 17:48:52 +0800

davidhoyt gravatar image davidhoyt
45

iantsai - I think the question must have been a bit confusing. I'm not asking how to page my data, I'm asking if there's a way for the grid (or listbox) column headers to stay where they are as you scroll vertically. Paging doesn't matter - if my page size is 100 records and they don't all fit in the grid's viewport, you'll have to scroll vertically to see them all. As you're scrolling, it would be nice if the column headers always remained visible. Currently, I have to scroll all the way to the top of the list to see which column is what.

dastultz - I've set the height of the grid explicitly and it still doesn't do it. )c: I'm thinking the ZK grid just doesn't support it.

link publish delete flag offensive edit

answered 2009-07-21 20:48:33 +0800

jj gravatar image jj
638 3

davidhoyt,
I think you are mistaken. ZK DEFINITELY supports the content-scrolling with fixed column headers. As a matter of fact, I don't think you have a choice of NOT fixing the headers if you scroll the grid content. Set the height="...px" will make the scrollbar appear for the content only. Maybe you can post some sample code to show that it doesn't work this way?
@dastultz, Yes, freezing a particular column when scrolling horizontally is a great feature to have. Hope ZK grid can implement that someday.

link publish delete flag offensive edit

answered 2009-07-22 05:06:31 +0800

wooosa gravatar image wooosa
6

@ davidhoyt,
Yes. As jj mentioned, ZK Grid supports the fixed column header. You can refer this live demo: Grid (Live Grouping).
http://www.zkoss.org/zkdemo/userguide/#g5

link publish delete flag offensive edit

answered 2009-07-22 17:51:56 +0800

davidhoyt gravatar image davidhoyt
45

You're absolutely right.

Does the grid, by default, expand to the size of its container or its contents? I ask b/c I have it in a <borderlayout /> as the only child of a <center />. I expect <borderlayout /> to size it correctly, setting the width/height of the grid to the viewport width/height, therefore causing it to scroll. But if it's not sizing the grid and instead the grid is just expanding (therefore using the <center />'s autoscroll), then that could be the problem.

link publish delete flag offensive edit

answered 2009-07-27 06:57:03 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

<grid width="100%" vflex="true">
...
</grid>

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-07-17 17:53:58 +0800

Seen: 484 times

Last updated: Jul 27 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More