Click here to Skip to main content
16,017,502 members
Home / Discussions / C#
   

C#

 
QuestionRe: SQL Pin
jojoba201027-Jan-10 4:28
jojoba201027-Jan-10 4:28 
AnswerRe: SQL Pin
PIEBALDconsult27-Jan-10 5:29
mvePIEBALDconsult27-Jan-10 5:29 
QuestionProblem with a newer version of a dll Pin
KittyKit27-Jan-10 2:58
KittyKit27-Jan-10 2:58 
AnswerRe: Problem with a newer version of a dll Pin
ddecoy27-Jan-10 3:17
ddecoy27-Jan-10 3:17 
GeneralRe: Problem with a newer version of a dll Pin
KittyKit27-Jan-10 3:30
KittyKit27-Jan-10 3:30 
GeneralRe: Problem with a newer version of a dll Pin
ddecoy27-Jan-10 3:37
ddecoy27-Jan-10 3:37 
GeneralRe: Problem with a newer version of a dll Pin
KittyKit27-Jan-10 4:47
KittyKit27-Jan-10 4:47 
Questionsystem._ComObject databinding [modified] Pin
ddecoy27-Jan-10 2:30
ddecoy27-Jan-10 2:30 
I have a class that interops with a booking tool, the class only returns system._ComObjects
I can do late binding cause I know what type is being returned.
public BindingList<NameElement> GetPassengers()
        {
            BindingList<NameElement> names = new BindingList<NameElement>();
            ComClass _comClass = new ComClass();
            comClass.RetrieveCurrent();
            // comClass.IObj_NameElements contains 2 system._ComObject  
            foreach (NameElement name in comClass.IObj_NameElements)
            // The cast to NameElement is successful
            {
                names.Add(name);// I fill up a list of 2 NameElement objects 
            }
            return names;
        }

The problem is that when I try to use this list to bind it to a control by setting it's datasource to this list, the displaymember and valuemember can't be set because I get the error : 'Cannot bind to the new display member.
Parameter name: newDisplayMember'

Calling properties from the NameElement objects is no problem:
Console.WriteLine(names[0].LastName)


I have no clue why the data binding doesn't work ... D'Oh! | :doh:

Any help is as appreciated.

modified on Wednesday, January 27, 2010 8:40 AM

Questionpls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
vidhulibra 27-Jan-10 1:10
vidhulibra 27-Jan-10 1:10 
AnswerRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
#realJSOP27-Jan-10 1:18
professional#realJSOP27-Jan-10 1:18 
AnswerRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
Vikram A Punathambekar27-Jan-10 1:20
Vikram A Punathambekar27-Jan-10 1:20 
AnswerRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
#realJSOP27-Jan-10 1:26
professional#realJSOP27-Jan-10 1:26 
GeneralRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
J4amieC27-Jan-10 2:55
J4amieC27-Jan-10 2:55 
GeneralRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
#realJSOP27-Jan-10 9:36
professional#realJSOP27-Jan-10 9:36 
GeneralRe: pls explain the error i have stated with the code....(wen i tend to insert the datas into the table) Pin
Roger Wright27-Jan-10 18:26
professionalRoger Wright27-Jan-10 18:26 
QuestionSSL Certificate Status? Pin
Sunil G27-Jan-10 0:55
Sunil G27-Jan-10 0:55 
AnswerRe: SSL Certificate Status? Pin
SeMartens27-Jan-10 1:41
SeMartens27-Jan-10 1:41 
AnswerRe: SSL Certificate Status? Pin
Matt Meyer27-Jan-10 5:02
Matt Meyer27-Jan-10 5:02 
QuestionEncrytion and decryption a string [modified] Pin
3bood.ghzawi27-Jan-10 0:44
3bood.ghzawi27-Jan-10 0:44 
AnswerRe: Encrytion and decryption a string Pin
Keith Barrow27-Jan-10 1:13
professionalKeith Barrow27-Jan-10 1:13 
QuestionSQL connectivity issue in My own Windows Serive Pin
WinCrs27-Jan-10 0:29
WinCrs27-Jan-10 0:29 
AnswerRe: SQL connectivity issue in My own Windows Serive Pin
SeMartens27-Jan-10 0:53
SeMartens27-Jan-10 0:53 
AnswerRe: SQL connectivity issue in My own Windows Serive Pin
Covean27-Jan-10 1:01
Covean27-Jan-10 1:01 
AnswerRe: SQL connectivity issue in My own Windows Serive Pin
PIEBALDconsult27-Jan-10 5:32
mvePIEBALDconsult27-Jan-10 5:32 
GeneralRe: SQL connectivity issue in My own Windows Serive Pin
WinCrs27-Jan-10 18:19
WinCrs27-Jan-10 18:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.