Menu

Combobox example?

2013-12-05
2013-12-13
  • Daniel Boström

    Daniel Boström - 2013-12-05

    I started using TreeViewAdv a couple of days ago and so far I like it very much. However, I am trying to add a column containing a combobox but I am unable to figure out how to populate its items during runtime. In my custom node I have a list of values that I want to be presented in the combobox drop down list. I have not been able to find a single combobox example so I have no idea how to achieve this. Can anyone give my a simple example on how to use a combobox? What is the DataPropertyName expected to be for a NodeComboBox?

    Thanks in advance.

     
  • John Smith

    John Smith - 2013-12-09

    NodeComboBox1.DropDownItems.Add("Value1")
    NodeComboBox1.DropDownItems.Add("value2")
    NodeComboBox1.DropDownItems.Add("value3")
    etc....
    FYI
    You can also use Clear and AddRange just as you would with a listbox.

     
  • Daniel Boström

    Daniel Boström - 2013-12-13

    Thanks for the help, but isen't it possible to provide the drop down items using the DataPropertyName property like I do for every other column or how else am I suppose to make sure that each node's values only end up in its own combobox? If I use NodeComboBox1.DropDownItems.Add("Value1") "Value1" gets added to the combobox on every row.

     

Log in to post a comment.