How to bind a ultraToolbarsManager ComboBoxTool to a datasou

Posted by PeterWokke on 26-Oct-2016 04:04

Dear All,

On the Intragistics forum I have found this item: http://www.infragistics.com/community/forums/p/65232/330229.aspx#330229

Looks like the dropdown in a ribbon can be binded to a datasource object.

But it is not clear how to do this within Progress Development Studio.

Someone has an example how to do the binding?

Posted by PeterWokke on 07-Nov-2016 01:26

Dear All,

I used a BindableValueList to populate a ComboBoxTool with data from a datasource.

       define variable clsComboBoxTool   as Infragistics.Win.UltraWinToolbars.ComboBoxTool no-undo.

       define variable clsBindableValueList  as Infragistics.Win.BindableValueList no-undo.

       clsComboBoxTool = new Infragistics.Win.UltraWinToolbars.ComboBoxTool("ComboBoxToolField").

       clsBindableValueList = new Infragistics.Win.BindableValueList().

       clsBindableValueList:DataSource = bindingSourceFieldSelection.

       clsBindableValueList:ValueMember    = "AreaID".

       clsBindableValueList:DisplayMember  = "FieldName".

       clsBindableValueList:BindingContextControl = this-object.

       clsComboBoxTool = cast(ultraToolbarsManagerMain:Tools["ComboBoxToolField"],Infragistics.Win.UltraWinToolbars.ComboBoxTool).

       clsComboBoxTool:ValueList = clsBindableValueList.

All Replies

Posted by gdb390 on 26-Oct-2016 04:17

Create a bindingsource or place one on the screen in the visual designer 

Set the datasource property of the combo to the created bindingsource

reference the handle of the bindingsource to a query handle or the top-nav-query of a dataset

Posted by PeterWokke on 26-Oct-2016 04:50

On a normal comboBox you can assign a bindingsource.

But on a comboBox created on a Ribbon in a toolbar there is no option to set the bindingsource to the value list.

But you can assign a Infragistics.Win.BindableValueList to it.

I still have to find out how to assign a temp-table to a BindableValueList.

Posted by PeterWokke on 07-Nov-2016 01:26

Dear All,

I used a BindableValueList to populate a ComboBoxTool with data from a datasource.

       define variable clsComboBoxTool   as Infragistics.Win.UltraWinToolbars.ComboBoxTool no-undo.

       define variable clsBindableValueList  as Infragistics.Win.BindableValueList no-undo.

       clsComboBoxTool = new Infragistics.Win.UltraWinToolbars.ComboBoxTool("ComboBoxToolField").

       clsBindableValueList = new Infragistics.Win.BindableValueList().

       clsBindableValueList:DataSource = bindingSourceFieldSelection.

       clsBindableValueList:ValueMember    = "AreaID".

       clsBindableValueList:DisplayMember  = "FieldName".

       clsBindableValueList:BindingContextControl = this-object.

       clsComboBoxTool = cast(ultraToolbarsManagerMain:Tools["ComboBoxToolField"],Infragistics.Win.UltraWinToolbars.ComboBoxTool).

       clsComboBoxTool:ValueList = clsBindableValueList.

This thread is closed