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

Cell Dropdown event

Is there any event triggered by making a selection from a dropdown in a cell.
I am trying to trigger the setting of a changed variable, to indicate that a save is needed.
If you select from the dropdown, and go straight to close, it does not prompt to save.
My code has AfterUpdate being triggered, but seems its too late, so would be easier if I could pick it up on selection.

Colin

Comments

  • I think the OnComboClicked event is the one you're looking for but it only works if the user actually uses the mouse to select.
  • Doh!!!!!!
    Missed that one.
  • Colin,

    I have not tested this, but does the BeforeUpdate event not aid you in this? Also, when you say AfterUpdate...seems its too late, in what way do you mean? Does the AfterUpdate not fire until after the CLOSE event of the form?
  • The AfterUpdate (for me) was expected to be firing when I clicked my Save button. I think my problem here is that the form is using the SRP Ribbon, and as such the table control did not lose focus, which would have triggered AfterUpdate.
    When you then click on Close, the AfterUpdate fires, causes my Changed variable to be set to 1, which then prompted the request to save changes, but I already just clicked save, which saved and set my Changed variable to 0.

    My solution was to fire AfterUpdate, and then to UpdateCellEdit, so that the cell is no longer in edit mode.
    This was a logical and proper solution.

    OnComboClicked:
    CALL Send_Message(OLE_TABLE,"OLE.FireEvent","AfterUpdate","")
    CALL Send_Message(OLE_TABLE,"OLE.UpdateCellEdit")
    RETURN
Sign In or Register to comment.