hi, i have on my form a Ultracomboeditor control. i set it like
Me.cbocontainer1.DisplayMember = "no"
Me.cbocontainer1.ValueMember = "ID"
.SuggestAppend
Now i want instead of namename1name2
displayname, street,townname, street,towni have found nothing in the forum . only http://forums.infragistics.com/forums/p/16088/58711.aspx#58711
but this is only for wingrid.here i have no InitializeRow event
Hi,
There are two ways you can do this:
hi , thanks for your reply, but>Add a new column to your DataSource which contains the full text you want and use that column as >your DisplayMemberbut how get i the needed data in this column? i deliver only a datatable.>UltraCombo instead of UltraComboEditor did i have here a autocomplete mode?i set Me.cbo1.AutoSuggestFilterMode = Infragistics.Win.AutoSuggestFilterMode.Contains Me.cbo1.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
hi, i just tryed a UltraCombo . it displays me at dropdown a complete grid :( can i found only samples how exactly set the grid>in the ultracombo?did the search/autocomplete works over all cells?what are the main differences to the UltraComboEditor ?
If you add a field to your data source, then you would have to loop through the data source and populate that field with the combined values of the other fields in the same record to build the string you want to display. This is probably not a good way to do it.
Personally, I would use the UltraCombo control. The dropdown for UltraCombo is more robust and shows all of the columns in the data source by default. But you can hide any columns you don't want the user to see. In your case, you probably only want to show the one unbound column.
If your data source has columns likeID, Name, Street, and Town, you would do something like this:
Private Sub UltraCombo1_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraCombo1.InitializeLayout Dim band As UltraGridBand band = e.Layout.Bands(0) ' hide all column headers. band.ColHeadersVisible = False ' Hide all of the data source columns For Each column As UltraGridColumn In band.Columns column.Hidden = True Next ' add an unbound column to hold a string which has the combined address If Not band.Columns.Exists("Address") Then Dim addressColumn As UltraGridColumn = band.Columns.Add("Address") addressColumn.DataType = GetType(String) End If End Sub Private Sub UltraCombo1_InitializeRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles UltraCombo1.InitializeRow ' Popuplate the Address cell with the combined address If e.Row.Band.Columns.Exists("Address") Then e.Row.Cells("Address").Value = e.Row.Cells("Name").Text & ", " & e.Row.Cells("Street").Text & ", " & e.Row.Cells("Town").Text) End If End Sub
Hi Mike, thanks for your code sample (spez. hidding a column) not it works for me with the ultracombo
sorry mistake, i mean now it is meworking for :)
I figured that's what you meant. :)