Announcement

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

    SmartClient add Node to paged TreeGrid issue

    Hi All,

    I have some issue with paged TreeGrid. When I'm trying to add Node to TreeGrid this node is adding in wrong place. I will show you this problem on screenshots.

    In attachments there are two files: BeforeAdd where is my tree before add node and AfterAdd where my TreeGrid after add node. I'm trying to add child to node called L but this node is like child of Node TOTAL.
    When I'm not using paged TreeGrid Node is adding correctly.

    I noticed that in SmartClient console there is warning:
    09:28:24.914:XRP7:WARN:ResultTree:isc_ResultTree_0 (dataSource: NodeDataSource, created by: NodeTree):Adding node to tree with id property set to:169573175. A node with this ID is already present in this Tree - that node will be replaced. Note that this warning may be disabled by setting the reportCollisions attribute to false.

    I also noticed that this wrong node is adding in line 47967 in ISC_DataBinding.js:
    _dataAdd : function (records, length, rowNum) {
    var tree = this._tree,
    parentNode = this._parentNode;
    tree._childrenDataAdd(this, parentNode, records, length, rowNum, true);
    },
    this code is executed because in paged TreeGrid there are observer to each sub tree in TreeGrid which is paged.

    Do anyone have an idea how disable sub tree observers or how repair adding nodes to trees?

    SmartClient version v10.0p_2015-08-24/LGPL Deployment. When I upgrade SmartClient to version v10.0p_2017-01-24 this error also occurs.
    Attached Files
    Last edited by marcin11858; 25 Jan 2017, 01:46.

    #2
    I think you should not add a treenode by yourself.
    You should add the treenode in the corresponding tree at your server and call a reloadChildren on the parent.

    Comment


      #3
      I don't add treenode by myself. I'm using addData method from RestDataSource API and it's works correctly for not paged TreeGrid but not correctly for TreeGrid with pagination (dataFetchMode: "paged").

      Comment


        #4
        You appear to be adding a new node with the same ID as an existing node, so that seems to be just a bug in your application code - IDs need to be unique.

        Let us know if you think there's something more going on here, but if so, then see the FAQ for how to report bugs.

        Comment

        Working...
        X