Flextable with a locked in position header row despite scrolling

1,461 views
Skip to first unread message

Sunit Katkar

unread,
Dec 22, 2010, 4:56:36 PM12/22/10
to google-we...@googlegroups.com
I have a flextable. Its inside a scrollpanel because the number of rows is more than what can be shown at a time. So user has to scroll up and down to view all contents.

Now is there a way where I can keep the header row locked in its original position while rest of the rows are scrolled up and down?

I have seen such tables with some javascript widgets, and I think in SmartGWT too. However, I want to do this with  GWT.

Is it possible? Any hints?

ciosbel

unread,
Dec 22, 2010, 5:16:12 PM12/22/10
to Google Web Toolkit
The simplest thing (keeping you original idea) is to use a flextable
for the header and a flextable (with no header) for the content.
See for example http://gwt.google.com/samples/Mail/Mail.html
Code
http://code.google.com/p/google-web-toolkit/source/browse/tags/2.1.1/samples/mail/src/com/google/gwt/sample/mail/client/MailList.ui.xml?r=9478
Maybe you can even still use one flextable and play around with fixed
positioning of the first row, but its hacky.

But it's a dummy example, if you need to interact or simply manage
displayed content (paging/caching/...) i suggest to use a different
widget, like
CellTable (http://gwt.google.com/samples/Showcase/Showcase.html#!
CwCellTable)
or
PagingScrollTable from the incubator suite (http://
collectionofdemos.appspot.com/demo/
com.google.gwt.gen2.demo.scrolltable.PagingScrollTableDemo/
PagingScrollTableDemo.html)

The latter will be supressed in a future release of gwt, so keep it in
mind.

ciosbel.

Sunit Katkar

unread,
Dec 23, 2010, 1:01:32 PM12/23/10
to google-we...@googlegroups.com
Thank you so much. I think using standard Flextable the way it is used in the Email application is suitable for me. I dont want to use any components from incubator which might be deprecated or removed in the future.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Reply all
Reply to author
Forward
0 new messages