Announcement

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

    ListGrid showing RollOverCanvas over editable cells (while editing)

    Hello,
    I'm trying to setup a listgrid with editable cells where one of the columns has a rollover canvas.
    I discovered the rollover canvas doesn't show while the cell is being edited, and I'm looking for a way to make it happen.

    The problem can be illustrated in your rolloverControls feature example here by introducing a few small changes - adding the 4 lines marked with the /**/ below:
    namely, setting the grid to be editable and setting the editor width in the 'continent' column to leave space for the rollover canvas on the right.
    Code:
    isc.ListGrid.create({
        ID:"countryList",
        width:520, height:224,
        data: countryData,
        selectionType:"single",
    
    /**/ canEdit: true,     
    /**/ editByCell: true,  
    /**/ editOnFocus: true, 
    
        fields:[
            {name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
            {name:"countryName", title:"Country"},
            {name:"capital", title:"Capital"},
            {name:"continent", title:"Continent", 
    /**/ editorProperties: { width:100 } 
            }
        ],
        showRollOverCanvas:true,
        showRollUnderCanvas:false, // disable the rollUnderCanvas because we're not using it
        rollOverCanvasConstructor:isc.HLayout,
        rollOverCanvasProperties:{
            snapTo:"R", height:20, width:55,
            members:[
                {_constructor:"Button", title:"+", 
                 click:"isc.say('Expanded record:' + this.echo(this.parentElement.record))", 
                 height:20, width:27},
                {_constructor:"Button", title:"-", 
                 click:"isc.say('Collapsed record:' + this.echo(this.parentElement.record))",
                 height:20, width:27}
            ]
        }
    });
    Unfortunately, the rollover canvas will only appear over the un-edited rows but not on the currently edited cell.
    Is there a built-in solution to this or can you suggest an alternative approach to get to a similar functionality?

    (Note: 'editByCell' and 'editOnFocus' are not required for illustrating this issue - I just added them because that is the way I need my grid to be set-up).

    Thanks
    Gil

    I've tested this on latest build: v12.0p_2019-10-25

    #2
    The rollOverCanvas doesn’t appear over the edited row because it would cover the editors and make the row non-functional.

    Are you arranging things somehow so this is not the case? Like perhaps trying to dynamically size the rollOverCanvas so it appears only over a non-editable cell? That doesn’t seem like it would work given the end user’s ability to reorder, resize or freeze columns.

    Comment


      #3
      Thank you for the quick response.

      Yes, I am actually setting the rollover canvas only on one specific column which is hard-coded to be frozen (I'm setting useCellRollOvers=true and implemented getFrozenRollOverCanvas to return a canvas only for that specific column).
      My canvas is displayed on the right side of that column, which has a fixed width and I've set the width of the cell editor to leave enough space for the canvas.

      I realize my case may be very specific but I can think of other cases when a rollover canvas could be displayed over an edited row without making it non-functional.

      Gil

      Comment


        #4
        Sounds like you’ve also disabled dynamic frozen columns and column resizing and reordering? Definitely an extreme edge case, so we want to keep the current behavior of not showing the rollover canvas for the edit row. It would be very non-trivial to even create a flag to turn it on for the edit row.

        We’d recommend that for the edit row, you simply define an editor for that special column that provides the same functionality as the rollover canvas. Then the mouse doesn’t even need to be over the row to access the functionality.

        Comment


          #5
          My case is certainly very specific, but I can certainly think of many grid setups where the rollover can work nicely over an edited row.
          Anyway, it's your call, so I'll need to consider your suggested workaround...

          Thanks

          Comment

          Working...
          X