How to force scroll of DataGrid to top on reload

472 views
Skip to first unread message

Bill M

unread,
Jan 26, 2012, 5:34:59 PM1/26/12
to Google Web Toolkit
Hello,

I would like to know if anyone knows how to set the scroll position of
the DataGrid widget to the top, following a reload? I don't see any
method that allow you to do this.

Does anyone know how?

Thanks,
Bill

Alfredo Quiroga-Villamil

unread,
Jan 26, 2012, 5:46:25 PM1/26/12
to google-we...@googlegroups.com
This is an "end of day - not thinking much" answer since I've never used the DataGrid in GWT but I would guess it has a SelectionModel of some sort. See if you can call on datagrid getSelectionModel().select(.... or something along those lines and this might do the trick. By calling something along the lines of select on the selection model, you should get the behavior you are looking for. Again, just guessing here which I don't typically do but today I feel like it.

Hope this helps you.

Regards,

Alfredo  


--
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.




--
Alfredo Quiroga-Villamil

AOL/Yahoo/Gmail/MSN IM:  lawwton


Thomas Klöber

unread,
Jan 27, 2012, 2:20:15 AM1/27/12
to google-we...@googlegroups.com
Am 26.01.2012 23:34, schrieb Bill M:
> I would like to know if anyone knows how to set the scroll position of
> the DataGrid widget to the top, following a reload? I don't see any
> method that allow you to do this.
use ScrollPanel.scrollToTop() of the scroll panel that holds your data grid.

--
Intelligent Communication Software Vertriebs GmbH
Firmensitz: Kistlerhof Str. 111, 81379 M�nchen
Registergericht: Amtsgericht M�nchen, HRB 88283
Gesch�ftsf�hrer: Albert Fuss

Thomas Broyer

unread,
Jan 29, 2012, 6:01:19 AM1/29/12
to google-we...@googlegroups.com

Dan Verkman

unread,
Jan 27, 2012, 9:52:30 AM1/27/12
to google-we...@googlegroups.com
Tom,
 
I am using the DataGrid Widget that came out in GWT release 2.4.  I don't think you have access to the ScrollPanel.


-----Original Message-----
From: Thomas Klöber <klo...@ics.de>
To: google-web-toolkit <google-we...@googlegroups.com>
Sent: Fri, Jan 27, 2012 2:20 am
Subject: Re: How to force scroll of DataGrid to top on reload

Am 26.01.2012 23:34, schrieb Bill M:
> I would like to know if anyone knows how to set the scroll position of
> the DataGrid widget to the top, following a reload?  I don't see any
> method that allow you to do this.
use ScrollPanel.scrollToTop() of the scroll panel that holds your data grid.

-- 
Intelligent Communication Software Vertriebs GmbH
Firmensitz: Kistlerhof Str. 111, 81379 München
Registergericht: Amtsgericht München, HRB 88283
Geschäftsführer: Albert Fuss

-- 
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