Click here to Skip to main content
15,891,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

In my application, i am using a BindingSource.
I am assigning DataSource to that BindingSource using IBindingList object like this :
objBindingSource.DataSource = objIBindingList


It is working fine for the first time, the problem occurs when i try to execute same stmt. again( I mean same method in which this stmt. resides).

It is showing this error when trying to execute 2nd time:
object does not match target type


Can anybody tell me why this is happening?

Thanks,
Nagendra.
Posted

1 solution

The assignment should not occur twice. Instead try implementing the INotifyPropertyChanged on the object.
 
Share this answer
 
Comments
nagendrathecoder 7-Jul-10 8:51am    
Thanks for replying. I figured out the problem.
Actually, i am setting my BindingSource as a DataSource to a 3rd party grid control at design time and thats where problem is occuring.
Now i am assigning it at run time and its working well.
But there is some problem in that grid control because same appl'n is working well with previous version of that grid control.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900