-
17 Oct 2011 1:40 PM #1
Unanswered: Converting to a live grid
Unanswered: Converting to a live grid
Our app currently is using a paging editor grid for its grid using JSON via jersey using a BasePagingLoader on a JsonPagingLoadResultReader that has been customized to use overlay objects.
I've been tasked to convert it to a live grid, which I was able to do without a ton of trouble. However, another part of our app scrolls the grid using a next/previous button to go between our rows. I have not been able to get this to work at all.
It used to manage the changes by calling the CellSelectionModel.select on an object after it used the PagingToolBar to advance the page as needed.
So I'm wondering do I still need the tool bar? I was hoping the store/loader would handle it, but it does not seem to. Can I have a PagingToolBar and a LiveToolItem bound to the same grid? Do they work together?
Anyone have any working example of how to get a live grid to move outside of its scrollbar?
Thanks!
Mike
-
17 Oct 2011 4:42 PM #2
After messing with this some more I see a problem with my data and data selection handler. The way the app works is you can click a student identifier in one column and it invokes a detail view of that student. This worked great using the paging grid as opposed to live, and works in live for the first page of students. After scrolling, I never get the learner I clicked on.
See the attached screenshot for how this looks. I clicked the "370, Student" on that page.
So there seems to be some kind of data banding thing going on. This snippet is the CellClick part of our grid listener and worked fine in the non live grid.
If you want to look at some of our grid handling code, feel free to do so, the major part of the interactions with the grid can be found at:Code:if (ge.getColIndex() == 0 || ge.getColIndex() == 1 || ge.getColIndex() == 2) { ModelData selectedLearner = newStore().getAt(ge.getRowIndex()); Dispatcher.forwardEvent(GradebookEvents.SingleGrade.getEventType(), selectedLearner); ge.getGrid().getSelectionModel().select(ge.getRowIndex(), false); }
https://source.sakaiproject.org/contrib/gradebook2/trunk/client/src/java/org/sakaiproject/gradebook/gwt/client/gxt/view/panel/MultiGradeContentPanel.java
I'm really curious how I can get a CellClick listener to work using live as opposed to paging.
thanks!
Mike
-
19 Oct 2011 11:43 AM #3
Which version of GXT are you using?This worked great using the paging grid as opposed to live, and works in live for the first page of students. After scrolling, I never get the learner I clicked on.
See the attached screenshot for how this looks. I clicked the "370, Student" on that page.
-
19 Oct 2011 12:00 PM #4
-
18 Nov 2011 3:43 PM #5
Thanks for sharing your code, this was helpful in solving a issue I have been dealing with on the online payroll site that I'm working on. I will need to be converting to a live grid here shortly and this information is exactly what I needed to move forward on this project. Everything seems to be functioning properly now. I am very relieved since I have been trying to work this out for a while now.


Reply With Quote