Results 1 to 4 of 4

Thread: DataRow and ColumnError property

  1. #1

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    DataRow and ColumnError property

    How do I utilise this.
    I do:
    VB Code:
    1. Public Function ValidateFields(ByRef Data As Mowlem.Booking.BusinessRules.BookingData.BookingEditRow) As Boolean
    2.         If Data.AssetKey < 1 Then
    3.             Data.SetColumnError("AssetKey", "Required")
    4.         End If
    5.  
    6.         'Blah blah blah
    7.  
    8. 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

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: DataRow and ColumnError property

    Your datarow has the seterror method, which should throw an exception.

  3. #3

    Thread Starter
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632

    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

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width