locked
DisplayMember with multiples columns RRS feed

  • Question

  • Hi all !!

    I'm trying to display more than one column in DisplayMember property of a ComboBox control. Is it possible?
    I alson can't concatenate the coluns in the select command, becouse I'm using this command for the DataSource:
    this.lstTables.DataSource = con.GetSchema("Tables");

    I hope you can help me.

    Regards,
    Eduardo Schuelter
    Thursday, November 16, 2006 11:34 AM

Answers

  •  Eduardo Schuelter wrote:
    I'm trying to display more than one column in DisplayMember property of a ComboBox control. Is it possible?

    NO....When default databinding is in use you can only bind the display member and the value member to a single column

    You can create a custom data class...that concantenates the columns  into a single class field that can be databound

    Thursday, November 16, 2006 7:42 PM

All replies

  •  Eduardo Schuelter wrote:
    I'm trying to display more than one column in DisplayMember property of a ComboBox control. Is it possible?

    NO....When default databinding is in use you can only bind the display member and the value member to a single column

    You can create a custom data class...that concantenates the columns  into a single class field that can be databound

    Thursday, November 16, 2006 7:42 PM
  • Friday, November 17, 2006 1:02 AM