Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    No other event is triggered after grid.updateData() call

    In my application I have four tabs and clicking on each tab opens up a grid. Whenever we make any change in any of the grid columns and click outside the grid, we trigger the
    addRowEditorExitHandler() .

    In this handler, we call a method and in this method, we do the following:

    1. We create a new list --> ListGridRecord record = new ListGridRecord();
    2. We get the record of the edited row --> ListGridRecord oldRecord = grid.getRecord(row);
    3. And with the help of this oldRecord, we add details to the new record variable. We iterate through the columns in the grid and if any column is edited we add it to the record variable like:
    record.setAttribute((String) key, value);

    4. After we are done adding the details in the record variable, we call the update data method on the grid:
    grid.updateData(record, dsCallback);



    If I make any update in the grid and instead of clicking outside on the screen, I click on any other tab on the UI, this will just close the row and it does not open up the other grid.

    This is working fine if we use saveAllEdits() method instead of updateData() method for updating the grid record.

    Can you help us to understand whether grid.updateData() performs some additional operations as well which is canceling the events triggered after it.

    Please let me know if I need to provide more details.






    #2
    It's not clear why you're doing any of this, since, what you're attempting to do is just the built-in behavior of autoSaveEdits:true and saveByRow:true.

    It's also not clear what the complaint is. Are you saying that when you try to click on another tab, the rowEditorExitHandler doesn't fire (unexpected and not reproducible)?

    Or are you saying it does fire, but then when you call updateData(), something else happens or doesn't happen?

    What do you mean by "does not open up the other grid"? Our code wouldn't be doing that, so if your code would normally do that, you need to figure out why it fails.

    Comment


      #3

      Apologies for not making the question very clear. I am attaching the screenshot of my application UI.
      Here we can see that there are four tabs Door Order, Door Part Order, Frame Order, and Frame Part Order. And Clicking on each of the tabs opens up a new grid as we are seeing for the Frame Order tab.

      When I try to edit line #1, row #1 becomes editable as shown in screenshot #2. I change the qty field and instead of clicking outside I just directly click on another tab for ex "Door Order" tab.

      This will just close the line and the UI will be as per screenshot #3.

      Ideally should close the line, make the update call of the grid and trigger the tab click handler for the "Door Order" tab, and the grid under "Door Order" should get open.

      Screenshot #1
      Click image for larger version

Name:	Grid.JPG
Views:	18
Size:	55.7 KB
ID:	268309



      Screenshot #2


      Click image for larger version

Name:	Grid2.JPG
Views:	18
Size:	92.9 KB
ID:	268310

      Screenshot#3

      Click image for larger version

Name:	Grid3.JPG
Views:	18
Size:	64.0 KB
ID:	268311
      Attached Files

      Comment


        #4
        Sounds like you have enabled listGrid.modalEditing, and it's doing exactly what it's documented to do. Turn it off if you don't want that behavior.

        If that's not it, it may instead be that code you've placed in an event handler is crashing, which would end processing. So look in your Developer Console for JS errors.

        Comment

        Working...
        X