By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,369 Members | 1,138 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,369 IT Pros & Developers. It's quick & easy.

Databount ErrorProvider

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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" <jd*@jdjBOGUS.dk> wrote in message
news:Os*************@tk2msftngp13.phx.gbl...
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

Nov 21 '05 #2

P: n/a
Jeppe,
BTW: Post if you want a sample of what I mentioned in my other post.

Hope this helps
Jay

"Jeppe Jespersen" <jd*@jdjBOGUS.dk> wrote in message
news:Os*************@tk2msftngp13.phx.gbl...
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

Nov 21 '05 #3

P: n/a
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
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.