Announcement

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

    ListGrid: missing selectionUpdated event with canSelectCells

    SmartClient Version: v13.1p_2025-06-26/AllModules Development Only (built 2025-06-26)

    Hello, I noticed that when ListGrid.canSelectCells is enabled, if I:
    - press the mouse button to select a cell, and without releasing the button
    - move the cursor out of the grid
    - release the mouse button while out of the grid

    the selectionUpdated and cellClick methods are not called even though the cell is selected, as confirmed by countryList.getSelectedCellData()

    I believe that at least selectionUpdated should be triggered.

    Please try it in this test case:
    Code:
    isc.ListGrid.create({
        ID: "countryList",
        width:500, height:224,
        data: countryData,
        fields:[
            {name:"countryCode", title:"Flag", width:65, type:"image", imageURLPrefix:"flags/24/", imageURLSuffix:".png"},
            {name:"countryName", title:"Country"},
            {name:"capital", title:"Capital"},
            {name:"continent", title:"Continent"}
        ],
        cellClick: function (record, rowNum, colNum) {
            isc.logEcho("cellClick")
            return this.Super("cellClick", arguments);
        },
        selectionUpdated: function (record, recordList) {
            isc.logEcho("selectionUpdated")
        },
        selectionType: "multiple",
        canSelectCells: true,
        canDragSelect: false
    })
    Last edited by claudiobosticco; 2 Jul 2025, 12:46.

    #2
    Hi, I’ve provided a bit more detail on how to reproduce the issue. Let me know if anything is unclear and/or if you need more details or a screen recording

    Comment


      #3
      After reviewing the documentation and analyzing my use case more carefully, I realized that the method I should have used is cellSelectionChanged.
      This was an old piece of code (from around 2012) where I had used selectionUpdated - I'm not sure whether that was due to lack of knowledge on my part or because cellSelectionChanged wasn't available yet.
      I'm not sure if the test case above actually reveals a bug, but for my use case, I'd say the issue is resolved.

      Comment

      Working...
      X