Question

I have a comboboxcell it works just fine . I got the value from a database. The Problem is there is around 100 rows but all are different value. So when i click the combobox it drops a long list. Is there a way to make the list look short but the amount of values display is still 100. here is my comboboxcell code.

    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

    Me.DataGrid.Columns.Add(c3)
Was it helpful?
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top