vb.net 2005 datagrid combobox DropDownStyle

  • 13 years ago
    Hi..
    Im developing an application in vb,net 2005 that uses Datagrid and i was trying to use a combobox in the datagrid that can be populated somehow programaticaly.
     
    from the datagrid columns collection i added a datagridviewcombobox column and i populated it with some data .. but this combo box is just for view which means that i can't write inside it in run time some new values that are not populated in it ..
     
    so if there is any way to add combobox as the that looks like the windows forms combobox that can be edited in run time ..
     
    Thanx all .
  • 13 years ago
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim items() As String = {"item1", "Item2", "item3", "blah"}

    Column1.Items.AddRange(items)
    End Sub

    'where column1 is the cdatagridviewcombobox column

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“God could create the world in six days because he didn't have to make it compatible with the previous version.”