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
125
Inconsistent UltraComboEditor.Value behavior
posted

I'm a bit confused right now. It's taken a while to narrow down my problem, and it doesn't make sense. I'm binding a list of simple objects to an UltraComboEditor. There's nothing particularly special about the items, or the editor itself. I have manually set the DisplayMember and ValueMember properties, and bound the list. Depending on whilch machine I run on, I get inconsistent behavior from the control. On my dev box (Win7 64 bit, VS2010) I get the proper response back for the Value property of the control. That is, I get the Id property back from the item, since that is what I set as the ValueMember property of the control. On my neighbor's identical machine, he gets back a string which we've determined corresponds to the first alphabetical property of the bound object. This is the same code. I mean exactly the same code. If I build it on his machine, the control returns one thing. If I build it on my machine I get something else.

I thought at first that the presence of a previous version of the controls (2009.1) on his machine might have been the problem, but I have it on my machine, too. I found references to the 2009.1 versions of the controls in the .licx file, so I removed them, and the problem remains.

I am, quite frankly, at a loss. I "Get Latest" to both machines (using TFS), and build... different behavior. Any help/clue would be appreciated.

Parents
No Data
Reply
  • 469350
    Offline posted

    Are you sure you are setting the ValueMember property and that it is not getting reset somewhere in the code? If ValueMember is not set, then the Combo falls back to using the first column in the data. This would explain what's happening in your case, because the data source returns the data in an arbitrary order. In fact, I have personally encountered issues like this where the BindingManager in DotNet returns the columns in a data source in a different order on different machines. In my case it was because the machines in question have different versions of the DotNet Framework installed and were running different operating systems.

     

Children