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,
I am glad that my explanation was helpful for you. Please let me know if you need any further assistance on this issue. In the future do not hesitate to write us if you have any questions related to using our products.
Thank you for using Infragistics Components!
Hi Ivaylo,
Found something much simpler.
ultraComboEditorMenu:value = ListBranch.qmenuid.
That works better.
Regards, Peter
Thank you kindly for your explanation. Progress is one of your re-sale customers.
There is a potential need for some more information to use the controls within that language.
I could also use there community on questions about the use of the ultra controls.
I worked on your guide lines and have done it as follows.
define variable iLoop as integer no-undo. define variable clsValueList as Infragistics.Win.ValueList no-undo. define variable clsValueListItem as Infragistics.Win.ValueListItem no-undo. clsValueList = ultraComboEditorTopMenu:ValueList. do iLoop = 1 to clsValueList:ValueListItems:Count. if clsValueList:ValueListItems:Item[iLoop - 1]:DisplayText = TopBranch.qmenutit then do: clsValueListItem = clsValueList:ValueListItems:Item[iLoop - 1]. leave. end. end.
ultraComboEditorTopMenu:SelectedItem = clsValueListItem.
I have used the property DisplayText to make the evaluation.
Could not find and other property.
ultraComboEditorTopMenu:value has the key from the data set but could not find this in a valuelist:item.
But now it works. Sometime it is difficult to find good method and the right properties to get it done.
Thank you kindly for your time.
Regards Peter
I am not familiar with Progress language (since it is not of the support development languages of Infragistics), so I am going to explain you the logic of the code that you do not understand. The idea is to enumerate through the value list and check if the current value list item`s data value is equal to the selected node`s text value of the UltraTree.
For each ValueListItem in the ValuList
If ValueListItem.DataValue (accessing the property DataValue) is equal to UltraTree.SelectedNodes[0].Text (accessing the selected nodes collection, selects the first one and takes the text property)
Then assign this ValueListItem to the UltraComboEditor.SelectedItem
One possible approach is to use loop and “if” statement inside it. My research about the progress language syntax showed me that you can use [do loop] syntax. Here is reference to the article that I found for you: http://www.oehive.org/node/1337
I am waiting for your feedback.
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