Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

EditTable Poschanged RepeatCount parameter

I have a lot of code attached to the PosChanged and PosChanging events. To keep the EditTable from seeming sluggish, I would like to use the RepeatCount parameter to bypass most of this code if the user is simply navigating the EditTable, say by holding down the UpArrow key.

The documentation says "The RepeatCount can be used to determine if the key mentioned in the Cause parameter was held down. If the value is 1, then the key has been pressed for the first time. If it's greater than one, then the key is being held down." However, as far as I can tell, this parameter does not appear to reset when the key is released, or better yet have a different code, perhaps zero, when the key is released.

Basically, it would be nice to know when the user has released the navigation key after it was being held down. Then I know he has stopped in a new cell after simply navigating through the EditTable and I can execute the relevant code on the PosChanged and PosChanging events.

Would it be possible at some point to enhance the RepeatCount as described above?

Comments

  • In the next update, the SRP EditTable Control will include the OnKeyNavigationDone event, which only fires after the user has finished navigating by holding down a key for at least two repetitions.
  • Great news! That will go a long way to make large EditTables more efficient.
    Thanks Kevin.
  • SRP EditTable Control 3.0.4 and SRP Controls Pro 3.0.6 are now available for download. This contains the new OnKeyNavigationDone event.
  • Hi Kevin,

    In doing some testing with the new OnKeyNavigationDone event, it appears that this event does not fire if you are navigating and the CellEditMode property's Edit Mode is set to "Edit". That is, it seems to only work when the cell's behavior when selected is "Navigation". Also, the OnKeyNavigationDone's CurrentCell parameter shows incorrect data, while PreviousCell, Cause and RepeatCount parameters are null.

    Thanks,

    Don
  • The OnKeyNavigationDone event has only one parameter: RepeatCount. I will investigate the "Edit" mode issue and get back to you.
  • Thanks Kevin. Sorry about the parameter comments, I was mistakenly looking at the OnKeyNavigationDone documentation's PosChanged example.

    Don
  • Are there any plans to have the OnKeyNavigationDone event fire when cells CellEditMode property's Edit Mode is set to "Edit"? See above discussion. For example when the code below is implemented, it does not appear to fire.

    Set_Property(Ctrl, "OLE.CellEditMode[All; All]", "Edit" :@FM: "Overwrite")

    Thanks.
  • I do intend to get to it. I entered it into my bug tracker, but I don't have an ETA on it yet.
  • I just took the new SRPControls.ocx beta for a test drive of the EditTable OnKeyNavigationDone event while CellEditMode is set to EDIT. In my testing it works if you're using the ENTER or TAB keys, but if you navigate vertically in a column using the UP arrow or DOWN arrow keys it does not work.

    Also, using PAGE UP or PAGE DOWN, the OnKeyNavigationDone event only seems to fire if you release the key when you reach the beginning or end of the EditTable.

    FYI

    Thanks for working on this.

    Don
Sign In or Register to comment.