我有两个 UltraCombo 项目,我试图在表单加载期间设置选定的索引,它们绑定到 UltraGrid EditorComponent,就像这样......
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
我尝试在添加新行时设置单元格值,但这不起作用。
e.Cell.Row.Cells(x).Value = "Main"
我也尝试过设置组合框的值,但没有奏效。
cboAccountCategory.Value = 1
是否可以从后面的代码中设置/更改组合框值?