Announcement

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

    ListGrid.getEditRow() issue on IE.

    Hi,

    We observe an issue for ListGrid.getEditRow() on IE: When we are leaving the edit mode of a row, ListGrid.getEditRow() returns null if "modalEditing" is true.

    We are using SmartClient_v83p_2013-09-01_PowerEdition. This issue can be reproduced on IE (8, 9 and 10), but on FF12 and Chrome it works fine.

    Please try the following code in Feature Explorer with the "countryData" data. Thanks!

    Steps to reproduce:

    1. Click any row to enter the edit mode.
    2. Click any other row to leave the edit mode for the row in step one.

    On FF12 and Chrome, ListGrid.getEditRow() returns correct row number for the row in step one. However, on IE it returns null.

    Code:
    isc.Label.create({
    top: 230,
    width: 300,
    height: 25,
    ID: "myLabel"
    });
    
    isc.ListGrid.create({
        ID: "countryList",
        width:500, height:224, 
        data: countryData,
        editEvent: "click",
        modalEditing: true,
        fields:[
            {name:"countryName", title:"Country"},
            {name:"continent", title:"Continent", canEdit: true, editorType:"text",editorProperties:{
             blur: function(form, item) {
             if (item.grid != null) {
             myLabel.setContents("The row leaving edit mode is row number "+ item.grid.getEditRow());}
    }}}]});

    #2
    Unlike all other event handlers, focus() and blur() cannot be made consistent between browsers, because IE fires them asynchronously. This is part of why editorEnter, editorExit and similar APIs exist - use those instead.

    Comment


      #3
      We tried "editorExit" instead of "blur" in above example, but ListGrid.getEditRow() returns null on all browers.

      In our case, we need a way to get the Edit row number while exiting the edit mode. You mentioned "This is part of why editorEnter, editorExit and similar APIs exist - use those instead. ". Can you please suggest which API should we use since "editorEnter" seems not for our scenario and "editorExit" doesn't work for the above code on SmartClient_v83p_2013-09-01_PowerEdition.

      Thanks!

      Comment


        #4
        Yes, the API is returning correct results - editing is complete, so getEditRow() should be null.

        If you are trying to keep track of the row where editing was last active for some reason, we'd recommend using editorEnter or rowEditorEnter.

        If your requirements are more complicated, please explain *in detail* what you are trying to do *from the end user's perspective* (ie don't just reiterate that you're trying to get the edit row num).

        Comment

        Working...
        X