I create a combo editor value list from a temp-table like this.
for each t-q_g_menu: ultraComboEditorTopMenu:Items:Add(t-q_g_menu.qmenuid, t-q_g_menu.qmenutit).end.
When I select a menu item from a tree view I whant to set the correct value of the menu item into the combo editor.
This works the first time correct.
ultraComboEditorTopMenu:SelectedText = TreeBranch.qtopmenuid.
Each time after the the combo displays each key value as added value to the string.
Like MAINMAIN after that MAINMAINMAIN and so on.
What do I have to do to select the proper item in value list of the combo editor?
Kind regards,
Peter Wokke
Hello Peter,
Thank you for posting in our forums!
Based on your scenario I recommend you to use UltraComboEditor`s SelectedItem property. After new selection occurs in the UltraTree, you can enumerate through the value list of the UltraComboEditor and find the first value equivalent to the selected UltraTree`s node text, since the value type of your UltraComboEditor items is string. Using this approach you are able to find and select the value item of the UltraComboEditor, no matter of its value list position.
In order to get more insight about my explanations I have created a sample project attached to the bottom of this post.
Please let us know if you need any further assistance or if we are missing something.
Hi Ivaylo.
define variable clsValueList as Infragistics.Win.ValueList no-undo. define variable clsValueListItem as Infragistics.Win.ValueListItem no-undo. clsValueList = ultraComboEditorMenu:ValueList.
Can you help me on this pointWhat method or what class do I have to cast to to get the ListItem clsValueListItem = cast(clsValueList, Infragistics.Win.ValueList):????????
ultraComboEditorMenu:SelectedItem = clsValueListItem.
Kind regards, Peter
Thank you for your repley. The program language I use is Progress.
We obtained our Infragistics UltraControls by them.
I have read your project and I am not familiar to the language.
In file Form1.cs I find ultraTree1_AfterSelect
In her you create ultraComboValueList as ValueList and assign the value list of the ultraomboEditer1 to it.
Then you create selectedItem as ValueListItem one item from the ultraComboValueList
In that part I do not understand how you get the item with the text of the currentNode.
At last you you set the ultraComboEditor1 selectedItem to the selectedItem you fond.
Hope you know some Progess and can help me on this.
I will try some things on this and will send it in a next replay.
Peter