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
300
Prevent Move the ActiveRow if a condition is true
posted

How to prevent move the the Activerow if a condition is false..

By keyboard, i can use keydown event to prevent up en down key, if a condition is false

this is my code 

private void ultraGridFtrBayar_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode = Keys.Down)

                 if  (condition == true )     

                    {

                      // nothing to do, so the ActiveRow is not allowed to next row if Condition is true

                        e.Handled = true

                    }
 

   }

 How to do like this when mouse is clicked ?

thanks

 

  • 469350
    Offline posted

     What kind of condition are you using here? It sounds like you should be using the BeforeRowDeactivate event or maybe BeforeRowUpdate.