Home Forums WinForms controls Xceed Grid for WinForms Setting cell focus in ending edit event

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #13822 |

    Im validating a row in the EndingEdit event and I want to set focus to the appropriate cell with the ‘error’ using the CurrentCell method, but it doesn’t seem to want to change focus, remaing on the cell it was on before the event was fired. How can it be done?
    Thanks in advance.

    Imported from legacy forums. Posted by pint (had 2454 views)

    User (Old forums)
    Member
    Post count: 23064

    Maybe the current cell gets set after the EndingEdit event is fired. You could try setting it in the EditEnded event that is fired later. In your EndingEdit event handler, you don’t set the CurrentCell, but you use some variable for this. In your EditEnded event handler, you check this variable and set the CurrentCell.

    Imported from legacy forums. Posted by Tommy (had 285 views)

    User (Old forums)
    Member
    Post count: 23064

    Yes, I tried that, but as I ‘cancel’ the edit in the validation error event, the EditEnded (& EditCancelled) events are not called. I also tried setting it in the validation error event, but that didn’t seem to work either.
    Thanks for your help though.

    Imported from legacy forums. Posted by pint (had 3523 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.