Utilize the setColFilter of the UltraCombo i.e. SetColFilter =
"CardName"
From:
vantage@yahoogroups.com [mailto:
vantage@yahoogroups.com] On Behalf
Of frederic.naslis
Sent: 17 April 2007 22:22
To:
vantage@yahoogroups.com
Subject: [Vantage] UltraCombo Question
Hi all ,
I got a question about the ultracombo object for customization. How
do you choose to display only one column of a datable. In my case i
set the
cmbCreditCard.ValueMember = "CardID" and
cmbCreditCard.DisplayMember = "CardName" but both columns appears
did anyone got a solution ?.
Thanks.
PS : Here my code
'// Creating a table named Cards
Dim tblCards As DataTable
tblCards = New DataTable("Cards")
'// Declaring three rows for the table
Dim Row1, Row2, Row3 As DataRow
'// Declaring a column named Code
Dim CardID As DataColumn = New DataColumn("CardID")
'// Setting the datatype for the column
CardID.DataType = System.Type.GetType("System.String")
'// Adding the column to table
tblCards.Columns.Add(CardID)
'// Declaring a column named Name
Dim CardName As DataColumn = New DataColumn("CardName")
'// Setting the datatype for the column
CardName.DataType = System.Type.GetType("System.String")
'// Adding the column to table
tblCards.Columns.Add(CardName)
'// Filling the row with values. Item property is used to set
the field value and add it .
Row1 = tblCards.NewRow()
Row1.Item("CardID") = "AMEX"
Row1.Item("CardName") = "American Express"
tblCards.Rows.Add(Row1)
Row2 = tblCards.NewRow()
Row2.Item("CardID") = "MC"
Row2.Item("CardName") = "MasterCard"
tblCards.Rows.Add(Row2)
Row3 = tblCards.NewRow()
Row3.Item("CardID") = "Visa"
Row3.Item("CardName") = "Visa"
tblCards.Rows.Add(Row3)
cmbCreditCard.ValueMember = "CardID"
cmbCreditCard.DisplayMember = "CardName"
cmbCreditCard.DataSource = tblCards
[Non-text portions of this message have been removed]