Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
OriginalValue with ValueList
posted

Hi,

I have a grid with ValueList.  I allow the user to change the value via dropdownlist, however, I also have cancel button on the row so that user may rollback to the original value.  It seems to work on first rollback.  But on consequent try, it restores the user selection from the dropdownlist.  Seems like OriginalValue is changed when the dropdownlist value is changed.  How can I preserve the OriginalValue so that I can restored to?  Thanks.

  • 469350
    Suggested Answer
    Offline posted

    How, exactly, are you canceling the changes to the row? It sounds to me like maybe you are doing this the hard way.

    Did you know that if the user presses Escape once it will, by default, cancel any pending changes to the current ActiveCell? And that if they press Escape again, it will cancel all pending changes in the entire row?

    To achieve the same effect in code, you only have to call CancelUpdate on the Row, you do not need to store the values yourself.