DataRow and ColumnError property
How do I utilise this.
I do:
VB Code:
Public Function ValidateFields(ByRef Data As Mowlem.Booking.BusinessRules.BookingData.BookingEditRow) As Boolean
If Data.AssetKey < 1 Then
Data.SetColumnError("AssetKey", "Required")
End If
'Blah blah blah
End function
So I validate the row, and add errors to it.
How do i show these in the UI?
What I mean is, can .NET automatically bind these or something, or do i manually have to write code to handle and display these errors?
Woka
Re: DataRow and ColumnError property
Your datarow has the seterror method, which should throw an exception.
Re: DataRow and ColumnError property
Errr...I can set the error message for a datarow, but I am setting them for each datacolumn.
I was wondering if .NET handled this automatically with out me writting extra plumbing code to display this column errors.
I can set the error for a datarow, but this doesn't automatically throw an error. I would have to write code to handle thius?
Woof
Re: DataRow and ColumnError property
Ok, if you want an exception to be thrown automatically, that won't happen. The error description gets stored with the column and you can use GetColumnError() to get the error associated there. But if you want it to be thrown so that you must explicitly handle it, then you'd have to override or create a few new methods.