1. #1
    Sencha User
    Join Date
    Dec 2008
    Posts
    4
    Vote Rating
    0
    mjwenk is on a distinguished road

      0  

    Default 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

  2. #2
    Sencha User
    Join Date
    Dec 2008
    Posts
    4
    Vote Rating
    0
    mjwenk is on a distinguished road

      0  

    Default


    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.

    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);
    }
    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:

    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

  3. #3
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    Answers
    60
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    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.
    Which version of GXT are you using?

  4. #4
    Sencha User
    Join Date
    Dec 2008
    Posts
    4
    Vote Rating
    0
    mjwenk is on a distinguished road

      0  

    Default


    We are using version 2.2.5 on GWT 2.4

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    4
    Vote Rating
    0
    Leila is on a distinguished road

      0  

    Default


    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.

Thread Participants: 2