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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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.
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.