Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Bugs & Issues> Project To IBindingList
 

Pages: 1
Bugs & Issues
Project To IBindingList
Page:1/1 

  Print all messages in this thread  
Poster Message
Dan1
User



Location:

Joined on:
20-Sep-2007 16:09:06
Posted:
41 posts
# Posted on: 01-Oct-2007 17:25:44.  
        Dim projector As New ORMSupportClasses.DataProjectorToCustomClass(Of Weld.Business.WeldSpec_Spot_WeldNo)(oWeldSpecs_Spot_WeldNo)

This was working until I found out that the grid I am binding the custom class list to will require the class to implement IBindingList. I changed the oWeldSpecs_Spot_WeldNo to be a BindingList instead of a List collection, but I get an error as the DataProjectorToCustomClass method is expecting an IList object.

Value of type 'System.ComponentModel.BindingList(Of Weld.Business.WeldSpec_Spot_WeldNo)' cannot be converted to 'System.Collections.Generic.List(Of Weld.Business.WeldSpec_Spot_WeldNo)'.


Is there anyway to project onto a BindingList<T> instead of the regular List<T>


-Dan
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14626 posts
# Posted on: 02-Oct-2007 12:06:55.  
Quote:
This was working until I found out that the grid I am binding the custom class list to will require the class to implement IBindingList.

I think the IBindingList should be implemented on the collection holding instances of your customClass, not to be implemented in the Custom Class itself.

Quote:
Value of type 'System.ComponentModel.BindingList(Of Weld.Business.WeldSpec_Spot_WeldNo)' cannot be converted to 'System.Collections.Generic.List(Of Weld.Business.WeldSpec_Spot_WeldNo)'.

Would you please post the corresponding code snippet?


  Top
Dan1
User



Location:

Joined on:
20-Sep-2007 16:09:06
Posted:
41 posts
# Posted on: 02-Oct-2007 14:13:58.  
No that's not what I was trying to do. I ended up just using a List instead of bindingList to project onto and then I create a new BindingList object that I pass in the List into the constructor and voila I get a BindingList.

Thanks anyway
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.