We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

CurrentCellValidate event not firing within NUnitForms

We are using a 3rd party tool called NUnitForms to drive our WinForms Testing activity. This works really well in most scenarios be we have a problem is that the CurrentCellValidate event doesn’t get fired if we change the cell value using NUnitForm for Databound grid and move to next cell. However the same works fine if we manually change the value in cell. Here is the code snippet. //change cell value gridTesterMain.Properties[gridTesterMain.Properties.CurrentCell.RowIndex,columnIndex].Text="Trial Name " + DateTime.Now.ToString(); //moving to next cell gridTesterMain.Properties.CurrentCell.MoveRight(1); //moving to next row gridTesterMain.Properties.CurrentCell.MoveTo(gridTesterMain.Properties.CurrentCell.RowIndex+1,columnIndex +1);

2 Replies

AD Administrator Syncfusion Team June 7, 2005 09:20 AM UTC

CurrentCellValidate is only raised when you change the CurrentCell via the UI. If you make a change through code, CurrentCellValidate will not be hit unless you interact with the currentcell like it is being edited from the UI: call grid.CurrentCell.MoveTo, call grid.CurrentCell.BeginEdit set the new value in grid.CurrentCell.Renderer.ConTrolText set grid.CurrentCell.IsModified = true call grid.CurrentCell.ConfirmChanges. Code changes should raise the grid.Model.SaveCellInfo event though. Can you use that event for your needs?


SH Steven Hawkes June 13, 2005 01:20 PM UTC

Thanks, this worked fine. Cheers >CurrentCellValidate is only raised when you change the CurrentCell via the UI. If you make a change through code, CurrentCellValidate will not be hit unless you interact with the currentcell like it is being edited from the UI: > >call grid.CurrentCell.MoveTo, call grid.CurrentCell.BeginEdit >set the new value in grid.CurrentCell.Renderer.ConTrolText >set grid.CurrentCell.IsModified = true >call grid.CurrentCell.ConfirmChanges. > >Code changes should raise the grid.Model.SaveCellInfo event though. Can you use that event for your needs?

Loader.
Up arrow icon