Hey guys,
I have a grid with a column associated to a combo.
The problem I have is that whenever I type in the cell, the combo will append the first match to the cell, however it will NOT select the row (the appended text) in the drop down list, so the suggestions (the items in the list) do not include the text in the cell.
This is how I'm adding the combo to the column:
UltraCombo combo = new UltraCombo(); combo.Name = associatedVVL.VVL; combo.DisplayMember = "Code"; combo.ValueMember = "Code"; UltraDataSource dataSource = new UltraDataSource(); UltraDataColumn ultraDataColumn1 = new UltraDataColumn("Code"); UltraDataColumn ultraDataColumn2 = new UltraDataColumn("Name"); dataSource.Band.Columns.AddRange(new object[ { ultraDataColumn1, ultraDataColumn2 }); foreach (ValidvaluesBO vvl in vvlList) { dataSource.Rows.Add(new object[ { vvl.Code, vvl.Name }); } combo.DataSource = dataSource; combo.DataBind(); column.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownValidate; column.ValueList = combo; column.AutoCompleteMode = Infragistics.Win.AutoCompleteMode.SuggestAppend;
As you can see in the following image, I typed F and it appended "CP-SD01", however the string FCP-SD01 is not listed in the combo.
Any help would be greatly appreciated
HA ! that fixed it !!!!
thanks !!
well, could i suggest an easier way of populating the grid cell which is to be used as a Combo. (this shud be done in the InitializeLayout preferrably)
Use ValueList objects,
ValueList codeList = new ValueList();
Add to the valuelist, the data that you want to show in the drop down, like this
codeList.ValueListItems.Add( code, name);
Once you build up the list of items, assign the valuelist to the VALUELIST property of the UltraGridColumn .
e.Layout.Bands[0].Columns["Your Column"].ValueList = codeList;
e.Layout.Bands[0].Columns["Your Column"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList;