Announcement

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

    Problem with using setEditValue on hidden fields with smartclient 10.0

    Hello,

    I'm testing out the new Smartclient 10.0 and I see an issue where hidden columns aren't respecting setEditValue. I'm using Google Chrome.

    Try this sample with 10.0:
    http://www.smartclient.com/docs/10.0/a/system/reference/SmartClient_Explorer.html#enterNewRows


    Code:
    isc.ListGrid.create({
        ID: "countryList",
        width:500, height:224, alternateRecordStyles:true, cellHeight:22,
        // use server-side dataSource so edits are retained across page transitions
        dataSource: countryDS,
    
    editorEnter : function (record, value, rowNum, colNum) {
    
     this.setEditValue(rowNum,'countryName','Test');
    },
    
        // display a subset of fields from the datasource
        fields:[
            {name:"countryName", showIf:"return false;"},
            {name:"continent"},
            {name:"member_g8"},
            {name:"population"},
            {name:"independence"}
        ],
    
        autoFetchData: true,
        canEdit: true,
        editEvent: "click",
        listEndEditAction: "next"
    })
    
    isc.IButton.create({
        top:250,
        title:"Edit New",
        click:"countryList.startEditingNew()"
    });

    You'll see that the required Country Name column is hidden. But, the editorEnter event will force a value to be set in the hidden column. So, when you enter a value in another cell and then press Enter to save, it should successfully save. But, expose Country Name and you'll see that there is a validation error the setEditValue call didn't actually set country Name. Now, try the same thing with smartclient 9.1 and setEditValue works correctly and the country name value is submitted.

    #2
    We're not actually seeing this problem. Could you double check with the latest nightly build and let us know if it persists for you?

    If so there may be some subtlety in the user-interaction which is responsible -- can you clarify the exact steps you take to start editing / how you attempt to save, etc?

    By the way - there is a new feature in this area - this property: discardEditsOnHideField allows developers to explicitly determine whether when a user hides a field, edits they have made to that field should be dropped or maintained.

    Thanks
    Isomorphic Software

    Comment


      #3
      Yes, it looks like this behavior changed in your online 10.0 feature explorer. Presumably your latest feature explorer is using a newer nightly build now.

      However, the problem has just changed and this is still broken compared to 9.1. If you try the test I provided, it should change the value of the country name column to "Test" whenever editorEnter fires for any cell in the row. With your 9.1 demo site, this is working. With your latest 10.0 demo site, that column isn't set to "Test" as a result of setEditValue.

      So, can you check that out and once that is resolved we'll need to see if it gets submitted without throwing a validation error on the hidden column?

      Comment


        #4
        Hi, I just downloaded your latest nightly and still see this behavior where the call to setEditValue in the editorEnter event is not changing the value of the Country Name column. And, it is not working whether country name is hidden or visible. Let me know when you are able to review.

        Comment


          #5
          Ok - we've finally tracked this down and are putting in a fix. Please try the next nightly build, dated Sep 25 or above

          Regards
          Isomorphic Software

          Comment


            #6
            Looks good, thanks

            Comment

            Working...
            X