Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1310
Attach a DataSource to a Combobox on a ToolBar
posted

I have a datasource created.  I need to get it attached to my comboboxtool on my toolbar.

Here is my code:

        Dim dsrc_Terr As New UltraDataSource      (this is built in another part of code.)


        Dim toolbar_RB As UltraToolbar = CType(utm_CommissionsReview.Toolbars("utb_ReviewBy"),
   UltraToolbar)
        Dim terr_CB As ComboBoxTool = CType(toolbar_RB.Tools("cmb_Territories"), ComboBoxTool)

        Dim terr_list As BindableValueList = New BindableValueList()

        terr_list.BindingContext = Me.BindingContext
        terr_list.SetDataBinding(dsrc_Terr, String.Empty)
        terr_list.DisplayMember = "_TRDM"
        terr_list.ValueMember = "_TRCODE"
        terr_CB.ValueList = terr_list

 

No errors.  No data in the combo.

Can anyone tell me what I am doing wrong?

-Duane