Groups | Blog | Home
all groups > dotnet windows forms databinding > november 2007 >

dotnet windows forms databinding : WindowsForm Designer databinding null reference exception


Giorgio Parmeggiani
11/20/2007 12:07:41 PM
I have a windows form project.
When I try to define a databinding, in the designer window, for a control, I
use (DataBindings) attribute, I obtain immediately a null reference
exception, only for this project!

It happens when I click on the attribute in the designer, so I cannot debug
v-lliu@online.microsoft.com
11/21/2007 2:36:26 AM
Hi Giorgio,

Based on my understanding, you have a VS2005 WinForm application project in
which a form has some controls on it. You select one control on the form
and go to the (DataBindings) entry in the Properties window. When you click
the drop down arrow in a sub entry under the (DataBindings), you get a null
reference exception. If I'm off base, please feel free to let me know.

To make things clear, I'd like to ask you some questions:

1. Could you tell me what the control is you're binding, a TextBox,
ComboBox or something else?
2. Does this problem exist on other controls?
3. Is there any custom data source in the project?

I look forward to your reply.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
v-lliu@online.microsoft.com
11/21/2007 8:55:08 AM
Hi Giorgio,

Thank you for your prompt reply!

By the "custom data source", I mean the type of the data source is defined
by yourself, e.g a type that implements the IBindingList interface.

If possible, could you send me a simple project that could just reproduce
the problem? To get my actual email address, remove 'online' from my
displayed email address.

Sincerely,
Linda Liu
Microsoft Online Community Support
Giorgio Parmeggiani
11/21/2007 8:57:59 AM
Hi Linda thank for your reply

Yes you have perfectly understood my problem

1. Any control, I have tried with textBox, Combo and Grid
2. Every control of any form of this project
3. I do not understand very well what is "custom data source" but I think
that I have not

Thank
Giorgio

"Linda Liu[MSFT]" <v-lliu@online.microsoft.com> ha scritto nel messaggio
news:E59aYd#KIHA.7908@TK2MSFTNGHUB02.phx.gbl...
[quoted text, click to view]
Giorgio Parmeggiani
11/22/2007 1:59:54 PM
Hi Linda

I have tried to build a test project.... and I have found 2 custom
datasource, this are custom object that do not implement "IBindingList".
The second datasource inherit from the first..... this can be a problem?

"Linda Liu[MSFT]" <v-lliu@online.microsoft.com> ha scritto nel messaggio
news:WxWnExBLIHA.360@TK2MSFTNGHUB02.phx.gbl...
[quoted text, click to view]
v-lliu@online.microsoft.com
11/23/2007 2:28:31 AM
Hi Giorgio,

Thank you for your reply!

I think the problem may be related to the custom data source in your
project.

If you could build a simple project that could reproduce the problem,
please send it to me.

I look forward to your reply!

Sincerely,
Linda Liu
Microsoft Online Community Support
v-lliu@online.microsoft.com
11/27/2007 4:18:00 AM
Hi Giorgio,

How about the problem now?

If the problem is still not solved and you could reproduce the problem in a
simple project, please send it to me.

I look forward to your reply!

Sincerely,
Linda Liu
Microsoft Online Community Support
AddThis Social Bookmark Button