Announcement

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

    [11.0 bug] TreeGrid.startEditingNew error

    SmartClient Version: v11.0p_2016-04-09/EVAL Development Only (expires 2016.06.08_11.15.36) Licensed to: Isomorphic Software (#ISC_EVAL_NIGHTLY)

    Chrome on OSX

    Hello, please modify the #treesEditing sample like this:

    Code:
    isc.TreeGrid.create({
        ID: "employeeTree",
        top:30,
        width: 500,
        height: 250,
        dataSource: "employees",
        autoFetchData: true,
        canEdit: true,
        canReorderRecords: true,
        canAcceptDroppedRecords: true,
        nodeIcon: "icons/16/person.png",
        folderIcon: "icons/16/person.png",
        showOpenIcons: false,
        showDropIcons: false,
        closedIconSuffix: "",
        fields: [
            {name: "Name"},
            {name: "Job"},
            {name: "Salary"}
        ]
    });
    
    isc.IButton.create({
       title:"Test",
       click:"employeeTree.startEditingNew()"
    })
    If you click the 'Test' button, you'll get this error in the developer console:

    Code:
    10:56:39.041:MUP3:WARN:Log:TypeError: Cannot read property 'EmployeeId' of null
    Stack from error.stack:
        ResultTree.indexOf(<no args: exited>) on [ResultTree ID:isc_ResultTree_0 (dataSource: employees, created by: employeeTree)] @ ISC_DataBinding.js:2196:377
        ListGrid.getRecordIndex(<no args: exited>) on [TreeGrid ID:employeeTree] @ ISC_Grids.js:2425:196
        ListGrid.getEditorType(<no args: exited>) on [TreeGrid ID:employeeTree] @ ISC_Grids.js:1981:969
        ListGrid.getEditItem(<no args: exited>) on [TreeGrid ID:employeeTree] @ ISC_Grids.js:2010:36
        ListGrid.getEditRowItems(<no args: exited>) on [TreeGrid ID:employeeTree] @ ISC_Grids.js:1982:156
        ListGrid.makeEditForm(<no args: exited>) on [TreeGrid ID:employeeTree] @ ISC_Grids.js:1968:43
        ListGrid._canFocusInEditor(<no args: exited>) on [TreeGrid ID:employeeTree] @ ISC_Grids.js:2234:142
        ListGrid.findNextEditCell(<no args: exited>) on [TreeGrid ID:employeeTree] @ ISC_Grids.js:2222:486
        ListGrid.startEditingNew(<no args: exited>) on [TreeGrid ID:employeeTree] @ ISC_Grids.js:2043:13
        eval(<no args: exited>) on [IButton ID:isc_IButton_0] @ [no file]:3:21
        StatefulCanvas.handleActivate(<no args: exited>) on [IButton ID:isc_IButton_0] @ ISC_Foundation.js:235:108
        StatefulCanvas.handleClick(<no args: exited>) on [IButton ID:isc_IButton_0] @ ISC_Foundation.js:236:13
        [c]EventHandler.bubbleEvent(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:1727:89
        [c]EventHandler.handleClick(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:1585:50
        EventHandler._handleMouseUp(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:1570:11
        [c]EventHandler.handleMouseUp(<no args: exited>) on [Class EventHandler] @ ISC_Core.js:1561:57
        [c]EventHandler.dispatch(_1=>[c]EventHandler.handleMouseUp(), _2=>[object MouseEvent]) on [Class EventHandler] @ ISC_Core.js:1805:108
        HTMLDocument.eval(event=>[object MouseEvent]) @ [no file]:3:123

    #2
    Any news on this issue? Still present in 2016-04-15 builds, and it affects also 10.1 and 11.1 branches.

    Comment


      #3
      Hello, I've just read in the docs:
      void TreeGrid.startEditingNew() ([newValues, suppressFocus])
      This inherited ListGrid API is not supported by the TreeGrid since adding a new tree node arbitrarily at the end of the tree is usually not useful. Instead, to add a new tree node and begin editing it, use either of these two strategies:
      Actually it worked for my use case in the past. Now I'll try to rework my code using the first strategy.

      Sorry for the bogus report.

      Comment

      Working...
      X