Announcement

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

    adding a record on a grid: same record is added on other grid with different implicitCriteria

    SmartClient Version: v12.1p_2020-09-23/Enterprise Deployment (built 2020-09-23)
    Chrome on OSX

    Hello, please try this test case in the #enterNewRows sample:

    Code:
    isc.defineClass("TestGrid", "ListGrid").addProperties({
        width:500, height:224, alternateRecordStyles:true,
        // use server-side dataSource so edits are retained across page transitions
        dataSource: countryDS,
        // display a subset of fields from the datasource
        defaultFields:[
            {name:"countryName"},
            //{name:"continent"},
            {name:"member_g8"},
            {name:"population"},
            {name:"independence"}
        ],
        canEdit: true,
        editEvent: "click",
        listEndEditAction: "next"
    })
    
    isc.TestGrid.create({
        ID: "countryList",
        implicitCriteria: {_constructor: "AdvancedCriteria",
            operator: "and",
            criteria: [
                {fieldName: "continent", operator: "equals", value: "Europe"}
            ]
        },
    }).fetchData({fieldName:"countryName", operator:"iContains", value:"a"})
    
    isc.TestGrid.create({
        ID: "countryList2",
        top:250,
        implicitCriteria: {_constructor: "AdvancedCriteria",
            operator: "and",
            criteria: [
                {fieldName: "continent", operator: "equals", value: "North America"}
            ]
        }
    }).fetchData({fieldName:"countryName", operator:"iContains", value:"a"})
    
    isc.IButton.create({
        top:500,
        title:"Edit New",
        click:"countryList.startEditingNew({continent:'Europe'})"
    });
    As you may see, the grids have a different implicitCriteria, but are fetched with the same criteria.

    Then edit a new record, insert a value which satisfies the criteria, ie "aTest" for countryName, and you'll see that the record is added to both grids.

    #2
    Well spotted - we've fixed this one for tomorrow's builds, dated September 26 or later

    Comment


      #3
      SmartClient Version: v12.1p_2020-09-29/AllModules Development Only (built 2020-09-29)

      I see it's fixed, thank you very much.

      Comment

      Working...
      X