PC Review


Reply
Thread Tools Rate Thread

Databount ErrorProvider

 
 
Jeppe Jespersen
Guest
Posts: n/a
 
      13th Aug 2004
I read the following - regarding the ErrorProvider control - in the MOC
Course Material for course 2373:

"You can set your own error messages manually, as shown in the following
example, or when working with bound data, you set the DataSource propertyof
the ErrorProvider to automatically pick error messages up from thedatabase."

So, basically I want the ErrorProvider to automatically pick up database
errors, but have so far had no luck. The MOC gives no example, so I pretty
much have to clue.

Any ideas?

/jdj


 
Reply With Quote
 
 
 
 
Jay B. Harlow [MVP - Outlook]
Guest
Posts: n/a
 
      13th Aug 2004
Jeppe,
If you bind a DataTable to a DataGrid, you can use the DataRow.RowError and
DataRow.SetColumnError methods to set errors for a specific row or a
specific column. The datagrid will then display an error icon w/tooltip on
that row (RowError) or cell (SetColumnError).

I have used both to set user errors, such as value required, normally I
handle the DataTable.ColumnChanging event to use the above DataRow methods.

I'm not sure what the book means by "from the database".

Hope this helps
Jay

"Jeppe Jespersen" <(E-Mail Removed)> wrote in message
news:OsN$(E-Mail Removed)...
> I read the following - regarding the ErrorProvider control - in the MOC
> Course Material for course 2373:
>
> "You can set your own error messages manually, as shown in the following
> example, or when working with bound data, you set the DataSource

propertyof
> the ErrorProvider to automatically pick error messages up from

thedatabase."
>
> So, basically I want the ErrorProvider to automatically pick up database
> errors, but have so far had no luck. The MOC gives no example, so I pretty
> much have to clue.
>
> Any ideas?
>
> /jdj
>
>



 
Reply With Quote
 
Jay B. Harlow [MVP - Outlook]
Guest
Posts: n/a
 
      13th Aug 2004
Jeppe,
BTW: Post if you want a sample of what I mentioned in my other post.

Hope this helps
Jay

"Jeppe Jespersen" <(E-Mail Removed)> wrote in message
news:OsN$(E-Mail Removed)...
> I read the following - regarding the ErrorProvider control - in the MOC
> Course Material for course 2373:
>
> "You can set your own error messages manually, as shown in the following
> example, or when working with bound data, you set the DataSource

propertyof
> the ErrorProvider to automatically pick error messages up from

thedatabase."
>
> So, basically I want the ErrorProvider to automatically pick up database
> errors, but have so far had no luck. The MOC gives no example, so I pretty
> much have to clue.
>
> Any ideas?
>
> /jdj
>
>



 
Reply With Quote
 
Jeppe Jespersen
Guest
Posts: n/a
 
      14th Aug 2004
Hi Jay,

I would like a sample, if you have one handy.

> If you bind a DataTable to a DataGrid, you can use the DataRow.RowError
> and
> DataRow.SetColumnError methods to set errors for a specific row or a
> specific column.


But... I don't see the big advantage of using the setError methods.
I mean, aren't you pretty much examining the entered values "manually"
when you use this approach? What exactly is it that the "databoundness"
of this approach gives you "for free"?

Also, what if i'm not using a datagrid, but just textboxes? Does that
render the datasource property of the errorProvider completely useless?

I sincerely hope I'm missing something.
....which has been known to be the case, other times :-D

Jeppe


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ErrorProvider dotnetdivis Microsoft Dot NET Framework Forms 0 14th Nov 2004 07:44 PM
Using ErrorProvider M O J O Microsoft VB .NET 7 19th Jan 2004 01:25 AM
ErrorProvider Steve Randall Microsoft VB .NET 0 23rd Dec 2003 09:52 PM
ErrorProvider CJ Taylor Microsoft VB .NET 0 11th Dec 2003 02:52 PM
ErrorProvider CJ Taylor Microsoft Dot NET Framework Forms 0 11th Dec 2003 02:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:09 PM.