不知何故,当我要求 3 时,它仍然显示超过 10 个值。这甚至是正确的方法吗?
Dim c3 As New DataGridViewComboBoxColumn()
c3.HeaderText = "Stripes"
c3.DataSource = BndSrc
c3.Name = "Stripes"
c3.DataPropertyName = "Stripes"
c3.DisplayMember = "Stripes"
c3.ValueMember = "Stripes"
c3.DisplayStyleForCurrentCellOnly = False
c3.DisplayStyle = DataGridViewComboBoxDisplayStyle.Nothing
c3.FlatStyle = FlatStyle.Standard
c3.SortMode = DataGridViewColumnSortMode.Automatic
c3.maxdrodownitems = 3
Me.DataGrid.Columns.Add(c3)