Hi,

I bind a data adapter (which implements the IBindingList interface)
to a data grid. For the data rows there is also an adapter which
implements the ICustomTypeDescriptor, IEditableObject and IDataErrorInfo
interfaces.

All works fine to bind my custom data types to the grid using my adapters.

Now it comes to validation: my IDataErrorInfo code returns the error message
strings for the columns. If I do that, the data grid automatically shows an
icon in each grid cell where the validation failed.

I did not set or use an error provider object.

My problem: I want to use another icon. So I need the error provider instance
that the grid uses. But what instance does the grid use? Does anyone know
where this error provider instance comes from and how can I access it?

Thanks,
Michael.

RE: Looking for the ErrorProvider a grid uses when bound to IBindingLi by mklapp

mklapp
Mon Oct 04 09:03:03 CDT 2004

You may have to add an Error Provider control to the Form and use that
explicitly.

"Michael Opel" wrote:

> Hi,
>
> I bind a data adapter (which implements the IBindingList interface)
> to a data grid. For the data rows there is also an adapter which
> implements the ICustomTypeDescriptor, IEditableObject and IDataErrorInfo
> interfaces.
>
> All works fine to bind my custom data types to the grid using my adapters.
>
> Now it comes to validation: my IDataErrorInfo code returns the error message
> strings for the columns. If I do that, the data grid automatically shows an
> icon in each grid cell where the validation failed.
>
> I did not set or use an error provider object.
>
> My problem: I want to use another icon. So I need the error provider instance
> that the grid uses. But what instance does the grid use? Does anyone know
> where this error provider instance comes from and how can I access it?
>
> Thanks,
> Michael.
>
>
>
>
>
>
>