LeaveCell event not firing after dragging a row selection

Posted by: overload-fp on 8 September 2017, 2:36 pm EST

  • Posted 8 September 2017, 2:36 pm EST

    I have a spread with the OperationMode = SingleSelect, SelectionPolicy = Single, SelectionUnit = Row.  If I click and hold on a cell, the row correctly becomes highlighted.  If I then drag the row selection to another row and release the mouse, the LeaveCell event is not fired.  Is this the intended behavior?  I have attached a sample project.

     Thanks. 


    2011/04/SpreadRowDragTester.zip
  • Replied 8 September 2017, 2:36 pm EST

    Hi,

    I am not sure why LeaveCell is firing at all in that case, because there is no actual ActiveColumnIndex when OperationMode = SingleSelect -- there is only ActiveRowIndex in that case.  I suggest using SelectionChanged instead (that will fire when the mouse is released), and use e.Range.Row to get the row index.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels