Bug found : errorprovider - datagrid

M

Martijn Leine

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
 
N

Nicholas Paldino [.NET/C# MVP]

Martijn,

If you are going to post a bug, then you should give a little more
information so that it can be correctly classified as a bug. For example
what is your setup? OS, .NET version, etc, etc. Also, a small code example
with steps to reproduce the bug are helpful as well.
 
M

Martijn Leine

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.Contactperson.ColumnChanging +=
new DataColumnChangeEventHandler
Contactperson_ColumnChanging);

private void Contactperson_ColumnChanging(object sender,
DataColumnChangeEventArgs e)
{
string colDataType = e.Column.DataType.ToString();

// Reset error
e.Row.SetColumnError(e.Column, "");

if (colDataType == "System.Int32")
{
int newvalue = (int)(e.ProposedValue);
if (newvalue < 10) {
e.Row.SetColumnError(e.Column,
newvalue.ToString() + " 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.SetColumnError(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 more
information so that it can be correctly classified as a bug. For example
what is your setup? OS, .NET version, etc, etc. Also, a small code example
with steps to reproduce the bug are helpful as well.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

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


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top