I have two UltraCombo items that I am trying to set the selected index on during form load that are bound to a UltraGrid EditorComponent like so...
With grdUserAccounts.DisplayLayout.Bands(0)
For x = 0 To .Columns.Count - 1
Select Case .Columns(x).Key
Case accountCategoryId
.Columns(x).Header.Caption = "Category"
.Columns(x).Width = 90
.Columns(x).Header.Appearance.TextHAlign = Infragistics.Win.HAlign.Center
.Columns(x).Header.VisiblePosition = 0
.Columns(x).CellActivation = Activation.AllowEdit
.Columns(x).EditorComponent = cboAccountCategory
.Columns(x).Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList
Case accountTypeId
.Columns(x).Header.Caption = "Type"
.Columns(x).Width = 90
.Columns(x).Header.Appearance.TextHAlign = Infragistics.Win.HAlign.Center
.Columns(x).Header.VisiblePosition = 1
.Columns(x).CellActivation = Activation.AllowEdit
.Columns(x).EditorComponent = cboAccountType
.Columns(x).Style = Infragistics.Win.UltraWinGrid.ColumnStyle.DropDownList
End Select
Next
End With
I've tried setting the cell value when a new row is being added but that didn't work.
e.Cell.Row.Cells(x).Value = "Main"
I've also tried setting the value of the combo boxes and that didn't work.
cboAccountCategory.Value = 1
Is it possible to set/change combo box values from code behind?