Advanced two-tables UI using JSDO and Hierarchical Kendo UI Grid - Forum - Mobile - Progress Community

Advanced two-tables UI using JSDO and Hierarchical Kendo UI Grid

 Forum

Advanced two-tables UI using JSDO and Hierarchical Kendo UI Grid

This question is answered

Hello,

I´m trying to create a CRUD Hierarchical Kendo UI Grid to update both tables, but when I sent my data to server for create/update/delete, an error are generated: Unable to call SAVE-ROW-CHANGES(). Failed to create query for BEFORE-TABLE. (7211)

I saw the threads bellow, but I didn´t find how it´s work for create/update/delete. 

https://community.progress.com/community_groups/mobile/f/17/p/23936/83484

https://community.progress.com/community_groups/mobile/f/17/t/25474

Regards,

William Pavei Antero

Verified Answer
  • Hello William,

    There are a couple of things to look at here.

    To fix error (7211), we would need to see the payload being sent to the server to see the structure of the dataset. Then we would be able to figure out what is causing it.

    Could you share the network info from the web inspector?

    There are some few ways that you could handle changes from two Kendo UI Grids.

    One approach uses settings for the transport: readLocal: true and autoSave: false.

    These properties are not documented yet but they were mentioned on first threads that you listed above:

       community.progress.com/.../83484

    Are you using these properties?

    How are you sending the changes to the server?

    Are you sharing the same JSDO with both grids?

    The general idea is that you would set readLocal: true and autoSave: false on the DataSource of the child grid.

    In this way, the update would be saved into the shared JSDO and a sync() on the DataSource of the parent grid would send the changes to the server.

    You would also need to handle the case where there are changes to the child grid but no changes to the patent grid.

    What version of OpenEdge and the JSDO are you using?

    I hope this helps.

    Edsel

  • Hierarchical_using_PDS_Template.zip
    Hi William,
     
    As per the error [Unable to call SAVE-ROW-Changes(). Failed to create query for BEFORE-TABLE], this could happen when a Save or Submit operation fails from client (mobile and web app) when the Business Entity possess multiple tables without SUBMIT operation.
     
    As Edsel suggested we need to have readLocal and autoSave properties that need to be set at the JSDO datasource level in order to achieve Hierarchical or Nested grid functionality.

    -          When readLocal is set to TRUE, then the data is read from the JSDO via the JSDO memory

    -          When readLocal is set to FALSE, then the data is read from the OpenEdge backend.

     
    Note: Please note that, readLocal() and autoSaveChanges() methods available at the JSDO level and are different from the readLocal and autoSave properties available at the JSDO Datasource level.
     
    Please find attached Telerik Platform mobile app sample followed by Business Entity class file which demonstrates the usage of hierarchical Kendo UI grid with listview control. Please replace with your service information (which possess CRUD+Submit operations) in the jsdoSettings.js file located in the project under scripts directory.

    -          This sample uses the same JSDO instance for both parent and child datasources

    -          Possess usage of readLocal and autoSave properties at JSDO datasource

    -          Uses PDS template which is available as part of Telerik Platform

    -          Possess JSDO 4.2

     
    Hope this helps.
     
    Thanks and Regards,
    Anil Kumar.
     
All Replies
  • Hello William,

    There are a couple of things to look at here.

    To fix error (7211), we would need to see the payload being sent to the server to see the structure of the dataset. Then we would be able to figure out what is causing it.

    Could you share the network info from the web inspector?

    There are some few ways that you could handle changes from two Kendo UI Grids.

    One approach uses settings for the transport: readLocal: true and autoSave: false.

    These properties are not documented yet but they were mentioned on first threads that you listed above:

       community.progress.com/.../83484

    Are you using these properties?

    How are you sending the changes to the server?

    Are you sharing the same JSDO with both grids?

    The general idea is that you would set readLocal: true and autoSave: false on the DataSource of the child grid.

    In this way, the update would be saved into the shared JSDO and a sync() on the DataSource of the parent grid would send the changes to the server.

    You would also need to handle the case where there are changes to the child grid but no changes to the patent grid.

    What version of OpenEdge and the JSDO are you using?

    I hope this helps.

    Edsel

  • Hi Edsel.

    Thank you for your aswer.

    I used the same example from http://oemobiledemo.progress.com/jsdo/example023.html.

    Attached my source codes (backend and html), and the information from Chrome Inspector.

    I´m using O.E. 11.6.3 and JSDO  4.2.0

    Regards,

    William

    KendoUIGridHierarchy.zip

  • Hierarchical_using_PDS_Template.zip
    Hi William,
     
    As per the error [Unable to call SAVE-ROW-Changes(). Failed to create query for BEFORE-TABLE], this could happen when a Save or Submit operation fails from client (mobile and web app) when the Business Entity possess multiple tables without SUBMIT operation.
     
    As Edsel suggested we need to have readLocal and autoSave properties that need to be set at the JSDO datasource level in order to achieve Hierarchical or Nested grid functionality.

    -          When readLocal is set to TRUE, then the data is read from the JSDO via the JSDO memory

    -          When readLocal is set to FALSE, then the data is read from the OpenEdge backend.

     
    Note: Please note that, readLocal() and autoSaveChanges() methods available at the JSDO level and are different from the readLocal and autoSave properties available at the JSDO Datasource level.
     
    Please find attached Telerik Platform mobile app sample followed by Business Entity class file which demonstrates the usage of hierarchical Kendo UI grid with listview control. Please replace with your service information (which possess CRUD+Submit operations) in the jsdoSettings.js file located in the project under scripts directory.

    -          This sample uses the same JSDO instance for both parent and child datasources

    -          Possess usage of readLocal and autoSave properties at JSDO datasource

    -          Uses PDS template which is available as part of Telerik Platform

    -          Possess JSDO 4.2

     
    Hope this helps.
     
    Thanks and Regards,
    Anil Kumar.
     
  • Hi Guys,

    Thank you for your help!

    Now it´s work!

    I just changed my Backend from CRUD to CRUD Submit.

    Best Regards,

    William