Announcement

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

    MultiDS with Multilink TreeGrid

    Hi,

    I'm trying to get the TreeGrid (loadDataOnDemand = true) working with MultiDS and Multilink functionality. I am using SmartClient Version: v12.1p_2020-08-16/Enterprise Development Only (built 2020-08-16).

    I managed to get the MultiDS working. However when I try to use the multilink functionality (linkDataFetchMode "single") as well, things start to fall apart.

    I can get the first level of data displayed. However when I try to expand, it doesn't show the children.

    It seems that the problem lies in how getDrawArea() (ISC_Grids.js:5527) of the treegrid body determines the draw area in case of mulitlink.
    getDrawArea() calls getTotalRows() (ISC_Grids.js:58299), which calls this.data.getLength() (ISC_DataBinding.js 59380), which invokes Super (ISC_Core.js:40873). This calls _getCachedNodeLength(this.root), which in turn calls _getCachedNodeLengthFromIndex(node, path) (ISC_Core.js:36396). This returns entry.paths[path].nodeLength;

    Since it always checks against the nodeLength of the root node, it seems it will always just return the number of records directly under the root node.

    I had to modify the __add function of the ResultTree because it tried to _incrementRecursionCount, _decrementRecursionCount and _getRecustionCount failed without explicitely specifying the path. The _assert parent == root failed for nodes not in root.

    I'm not sure if I'm not populating the data correctly, or that the multilink is not working with loadDataOnDemand? Is there more in depth documentation on multilink trees?



    Attached Files

    #2
    The longest single doc on how multilink trees work is here and it's rather in depth.

    Unfortunately, you've shown us zero information about the data you're providing, and the long list of internal methods doesn't help. If you can show us runnable code, we can point out what's going wrong.

    Comment


      #3
      Thanks, for your reply.

      I have managed to create an example for you. This recreats the assert error as mentioned in the first post.
      Attached Files
      Last edited by dw_qservices; 14 Apr 2021, 02:34.

      Comment


        #4
        This modification to the __add function gets me passed the assert error in the previous post. This gets me to the length problem mentioned in the first post.
        Attached Files

        Comment


          #5
          Hi,

          It seems after the forum maintenance, some posts have disappeared. Can you give me an update? Thanks!

          Comment


            #6
            Just a note that a developer has been assigned to look at this test case. We will respond on this thread when we have investigated.

            Thanks,
            Isomorphic Software Support

            Comment

            Working...
            X