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
944
UltraCombo Value
posted

Now I may have simply been puzzling over this too long, or I may be going crazy but I am having trouble reading a value set in an UltraCombo.

Here is my setup:

I have a form containing a textbox and a Tab control with 2 tabs.

Tab A just has Databound textboxes

Tab B contains an UltraCombo as well as other Textboxes, all databound. These textboxes only populate when the UltraCombo's value is changed, whether by the user, or by Databinding along with the fields on Tab A.

When the user enteres text in the search box on the main form, the Database retrieves a Dataset and populates all the Textboxes on Tab A, as well as the UltraCombo on Tab B.

The UltraCombo's ValueChanged event then fires, and so long as there is a value selected in the Combo, a second search is triggered which populates the rest of the fields on Tab B.

Now here is my problem.

When all searches have been run, the Combo does display a value, yet the the various lines of code I have listed below all show read as null when looked at during Debug and what i need to happen afterwards does not run:

ddlShipTo.Value.ToString() != ""

or

ddlShipTo.Value != null

or

ddlShipTo.SelectedRow.Index > -1

What am I doing wrong here?

Parents
No Data
Reply
  • 469350
    Offline posted

     Hi Jason,

        Does the same thing happen if you switch to the tab with the combo on it first?

        I have noticed some very strange behavior with DataBinding in DotNet. The CurrencyManager does not update controls that are invisible or whose handles have not been created. Do if you have a control on an inactive tab that has never been displayed and you set teh Value on that control, the first time you display it, the BindingManager will re-load the value from the data source and throw away your changes.  

Children