CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    357

    [RESOLVED] Datasource = List<object> + DataPropertyName

    Hey,

    Ive got a bit of a problem related to one of my previous posts... i have got a datagridview that has one of its columns set as a combo box and has an enum turned into a list of objects (with a key/value property exposed) which populates the list fine and is great...

    However when i try to link up a datatable to the view i keep getting DataErrors spitting up, now i think its down to the fact that its trying to pair up the byte value in the table to the byte value in the combo box, but must not be able to match it up... so i was just wondering if anyone else had ever had this sort of problem?

  2. #2
    Join Date
    Nov 2006
    Posts
    357

    Re: Datasource = List<object> + DataPropertyName

    Found the problem and fixed it, it was down to the property not matching the type... i thought they were both bytes, and although internally they were, one of them was being forced into an int at some point. So when matching the other side up to an int it worked fine...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured