在网格中,我只需要在同一列中选择多个单元格。不应允许用户从不同列中选择单元格。
我试过下面的代码。
Private Sub grdTransactions_InitializeLayout(ByVal sender As Object, _
ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) _
Handles grdTransactions.InitializeLayout
e.Layout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.CellSelect
End Sub
Private Sub grdTransactions_AfterSelectChange(sender As Object, _
e As AfterSelectChangeEventArgs) Handles grdTransactions.AfterSelectChange
Me.grdTransactions.DisplayLayout.Override.SelectTypeCell = UltraWinGrid.SelectType.Single
Me.grdTransactions.DisplayLayout.Override.SelectTypeCol = UltraWinGrid.SelectType.Single
Me.grdTransactions.DisplayLayout.Bands(0).Override.SelectTypeCell = UltraWinGrid.SelectType.Extended
Me.grdTransactions.DisplayLayout.Bands(0).Override.SelectTypeCol = UltraWinGrid.SelectType.Single
Me.grdTransactions.DisplayLayout.Bands(0).Override.MultiCellSelectionMode = MultiCellSelectionMode.Default
Me.grdTransactions.DisplayLayout.Bands(0).Override.MaxSelectedCells = 100
End Sub
上面的代码允许从差异列中选择单元格。告诉我我哪里错了?