Nicholas,
Sorry for late respons:
setup:
OS : Windows XP professional
..NET version 1.1
Visual Studio .NET 2003 (using C#)
example:
Errorprovider component (Errorprovider) (on form)
databound to a table of a dataset (DataSource =
objMyDataSet, DataMember = Contactperson)
Second errorprovider databound to another table:
(DataSource = objMyDataSet, DataMember = Company)
Code:
// set event handler
objMyDataSet.Co ntactperson.Col umnChanging +=
new DataColumnChang eEventHandler
Contactperson_C olumnChanging);
private void Contactperson_C olumnChanging(o bject sender,
DataColumnChang eEventArgs e)
{
string colDataType = e.Column.DataTy pe.ToString();
// Reset error
e.Row.SetColumn Error(e.Column, "");
if (colDataType == "System.Int 32")
{
int newvalue = (int)(e.Propose dValue);
if (newvalue < 10) {
e.Row.SetColumn Error(e.Column,
newvalue.ToStri ng() + " is less than 10");
throw new Exception(); }
}
}
-----------------------------------------------
comment:
Because an error on a column of a row is set, the
errorprovider can display an exclamation mark at the
corresponding cell in the grid (which is bound to the
Contactperson table), and also a hint. This hint will not
disappear when the error is corrected:
e.Row.SetColumn Error(e.Column, "");
I hope this gives you enough info to reproduce the
hint "problem".
Greetings,
Martijn Leine
-----Original Message-----
Martijn,
If you are going to post a bug, then you should give
a little moreinformation so that it can be correctly classified as a
bug. For examplewhat is your setup? OS, .NET version, etc, etc. Also,
a small code examplewith steps to reproduce the bug are helpful as well.
--
- Nicholas Paldino [.NET/C# MVP]
- ni************* *@exisconsultin g.com
"Martijn Leine" <ma**********@c lientsoft.nl> wrote in
messagenews:02******* *************** ******@phx.gbl. .. I am using an errorprovider and a datagrid component
on a form. I use the errorprovider to display error hints in
the grid, in the case the entered data by the user is
checked and not found Ok.
After the data is corrected, the hint does not
disappear ! (the exclamation mark however, does disappear).
For Microsoft:
If I'm correct, and it is a bug, can it be corrected ?
(I posted this bug-report here, because I was unable to
find the right place on the microsoft website to post
it)
Greetings,
Martijn Leine
.