You are not logged in.
This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.
In my program I have picked up the selection range changed event to update a personal Formula Bar. I ran into an issue when I would use the Enter or Tab key to move to another cell. The event fired just fine when I moved to the new cell, but when I moved back to the cell I just left, <using a mouse click>, it would not trigger/fire the selection range changed event. This is a very isolated bug. You have to perform these steps in a precise arrangement as described above. I could not replicate this behavior with any other method. I dug into the code and found that a function may have not been working as intended because incorrect information was being provided to it. The function that seemed to be having problems was in the CellsViewPort.cs file.
The misbehaving function:
public override bool OnMouseUp(Point location, MouseButtons buttons)
Line:1176
The following conditional statement was failing when it should have been true.
if (sheet.lastChangedSelectionRange != sheet.selectionRange)
Solution Below:
WARNING!!!! This has not been thoroughly tested and should remain in development until an exhaustive effort can be made to address all implications.
File location: ReoGrid-master\ReoGrid\Core\Worksheet\selection.cs
Lines: 661-662
661 this.lastChangedSelectionRange = this.selectionRange; //I Added this line.
662 this.selectionRange = range;
Regards,
Mark
Offline
Thanks Mark!
Offline