Ok, I need to validate one cell using the value of others cells in the same row.
And, wich is the best method to validate a row?
I mean, I want to validate a row before inserting new rows o before to save data.
Is there a sample anywhere ?
Thanks
jmagnet said:Same problem for MoveFirst, MoveLast, MovePreb and MoveNext.
Sorry, this correspond to another post.
Thanks for your answers.
Hi,
jmagnet said:Can I use UltraValidator for this proupose ?
Since UltraValidator works on a cell and you want to validate the row, I don't see how this would work.
I don't understand what you are asking. Is this part of the same discussion?
Same problem for MoveFirst, MoveLast, MovePreb and MoveNext.
I think the better way is write a event handler for every action.
Hi Mike.
Thanks for your support.
Can I use UltraValidator for this proupose ? Seems like this control is better for individual field values.
It depends what you want to do. But if you want to validate an entire row before that row is added, then a good event to use would be the BeforeRowUpdate event. This event fires for existing (edited) rows as well as new rows, but you can tell which one you are dealing with by checking the IsAddRow property on the row.
You can cancel the event (e.Cancel = true) to prevent the row from being committed. You can also use the BeforeRowUpdateCancelAction property on the DisplayLayout in order to determine what happens when the event is cancelled.