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
530
Reverting cell value back to its original in CellValueChanged
posted

Is there a way to revert the cell value back to its original value while you are in the CellValueChanged event? I'm running some validations which are telling the cell to revert back to its original value. Thanks

Parents
  • 53790
    posted

    Hello Ehan,

    There are different approaches to solve this task. My suggestion is to use for example ultraTree1_BeforeCellExitEditMode() event instead of

    ultraTree1_CellValueChanged() event, because ultraTree1_CellValueChanged() event will fire after each letter, that you type in the cell.

    If you are using ultraTree1_BeforeCellExitEditMode() event, you could validate your current value through property - e.Cell.EditorResolved.CurrentEditText, and if you decide to cancel your current value, you could set

    private void ultraTree1_BeforeCellExitEditMode(object sender, Infragistics.Win.UltraWinTree.BeforeCellExitEditModeEventArgs e)

    {

      /// Here is your Valudation

      e.ApplyChanges =false;

    }

    Let me know if you have any questions.

    Regards

Reply Children