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
650
Prevent row change when adding invalid data
posted

I have a AddNewBox on my grid and I do some validation on the Cell BeforeUpdate and DeActivate but if they dont enter certain values in one of the columns how do I prevent the user from selecting a different row.

How do I make sure they can't change rows without entering a certain value in one of the columns?

  • 20872
    Offline posted

    Hello,

    Have you been able to follow the suggestions above ?

    Please let us know if you have any further questions on this matter.

     

  • 469350
    Offline posted

    You can handle the BeforeRowUpdate event and set e.Cancel to true to cancel the update of the row.

    To keep the focus in the row, you can set:

    this.ultraGrid1.RowUpdateCancelAction = RowUpdateCancelAction.RetainDataAndActivation;

  • 355
    Suggested Answer
    Offline posted

    When you do the Validation in the deactivate you could refocus the cell and provide the user with some feedback.