in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

combobox columns

Last post 04-17-2008 12:48 AM by C1_JohnAd. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 04-15-2008 6:57 PM

    combobox columns

    hi, look i just want to show 2 columns from a datatable that has 7,  when i write this:

    C1Combo1.DataSource = accounts.lookUpAccounts (this returns a filled datatable)

    and i do not know how to show only 2 columns, it keeps showing 7. i try with valuemember and displaymember, almost everything.

    then when it shows the 7 columns, it expands all the columns to the left, and appears out of the screen.

    Hope you can help me. Sorry about the english.

  • 04-17-2008 12:48 AM In reply to

    Re: combobox columns

    Hi,
     
    In order to hide the column(s) in the C1Combo you need to use the DisplayColumn collection and then set the Visible property to false of the column.
    Below is the code snippet for the same:
     
    BEGIN CODE
     
    Me.C1Combo1.Splits(0).DisplayColumns(colIndex OR "ColumnName").Visible = False
     
    END CODE
     
    Hope this helps.
     
    Have a nice day.
     
    Regards,
    John Adams
     
    <netSlayer> wrote in message news:203913@10.0.1.98...

    hi, look i just want to show 2 columns from a datatable that has 7,  when i write this:

    C1Combo1.DataSource = accounts.lookUpAccounts (this returns a filled datatable)

    and i do not know how to show only 2 columns, it keeps showing 7. i try with valuemember and displaymember, almost everything.

    then when it shows the 7 columns, it expands all the columns to the left, and appears out of the screen.

    Hope you can help me. Sorry about the english.



    http://helpcentral.componentone.com/cs/forums/p/74969/203913.aspx#203913

Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.