Results 1 to 3 of 3

Thread: DataGridView multi column ComboBox

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Posts
    5

    DataGridView multi column ComboBox

    Hi,

    Is it possible to have a multi column combox box, being used as a lookup list, in a DataGridView.

    Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: DataGridView multi column ComboBox

    There is no multi-column ComboBox in the .NET Framework. There are plenty of examples available on the web showing how to create one. You'd need to then create your own class that implements one of those and also implements the IDataGridViewEditingControl interface. You'd also then need to create your own column and cell types to host your editing control.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Posts
    5

    Re: DataGridView multi column ComboBox

    Thanks for the reply. As you may have guessed, I'm a newbie to .NET.

    Like I said, I am using this column as a lookup from a master table. It is much more user friendly if I can show more data, rather than just one field.

    I'll take your advice and Google away, unless you can suggest a better solution for showing users more information in a bound lookup field.

    For example, I want the ValueMember to be an Integer, but allow the user to select from a list showing;

    Job Number | Description | Title

    Rather than just showing Job Number

    Thanks

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