Results 1 to 9 of 9

Thread: Example please ***

  1. #1

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Example please ***

    Sorry about repeated question. But can anybody give me a simply example about how can i execute a multicolumn combobox in datagridview ( may be 2 column, i will do similar later)

    Thanks. i need them verry much.

    i read this document in msdn but i cant still figure out.

    http://msdn.microsoft.com/en-us/library/7tas5c80.aspx


    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Example please ***

    Comboboxs are not multicolumned and I do not know what you mean by "execute a combobox"?

  3. #3
    Frenzied Member CoachBarker's Avatar
    Join Date
    Aug 2007
    Location
    Central NY State
    Posts
    1,121

    Re: Example please ***

    If you are loading a combo box using a query, then the DisplayMember? would be like
    Code:
    Me.ComboBox1.DisplayMember = "FirstName" & " LastName"
    Thanks
    CoachBarker

    Code Bank Contribution
    Login/Manage Users/Navigate Records
    VB.Net | C#

    Helpful Links: VB.net Tutorial | C Sharp Tutorial | SQL Basics

  4. #4
    Addicted Member
    Join Date
    Mar 2007
    Location
    San Pedro de Macoris, Dominican Republic
    Posts
    211

    Re: Example please ***

    As hack said, Comboboxes in a datagrid are not multicolumned. You could edit the columns using the smart tag and set the desired column to datagridviewComboBoxColumn in the design area.

  5. #5

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Re: Example please ***

    This is picture of it. i think to make it not very difficult but i cant still figure out.

    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

  6. #6

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Re: Example please ***

    Quote Originally Posted by CoachBarker View Post
    If you are loading a combo box using a query, then the DisplayMember? would be like
    Code:
    Me.ComboBox1.DisplayMember = "FirstName" & " LastName"
    I try :

    Code:
    ComboBox26.DataSource = stu.dt
            ComboBox26.DisplayMember = "Họ_tên" & "Ngày_sinh"
    But not work....
    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

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

    Re: Example please ***

    Have you got a multicolumn combo box control from the web? If not, that's the first thing to do. After that you need to either rewrite that control or else inherit it, then implement the IDataGridViewEditingControl interface. Do that first, then we can talk some more.
    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

  8. #8

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Re: Example please ***

    Quote Originally Posted by jmcilhinney View Post
    Have you got a multicolumn combo box control from the web? If not, that's the first thing to do. After that you need to either rewrite that control or else inherit it, then implement the IDataGridViewEditingControl interface. Do that first, then we can talk some more.
    I haven't got it. how can i do that ?
    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

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

    Re: Example please ***

    Quote Originally Posted by manhit45 View Post
    I haven't got it. how can i do that ?
    There's this cool site called Google that lets you search for things on the web. Whatever will they think of next?
    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

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