StrataFrame Forum

What happens in my BO???

http://forum.strataframe.net/Topic32751.aspx

By Thomas Holste - 12/3/2014

Hi there,




who can explain this BO-Behaviour to me?



If cmbbkz.Text.Trim.Length = 0 Then

  bbo.BKZ = " "

End If

If cmbrgls.Text.Trim.Length = 0 Then

  bbo.RGLS = " "

End If






Within the form I delete a vakue from the cmbrgls-combobox and want to save my BO. When I reach this snippet, the value of cmbrgls.text is "" , when I reach the second line (bbo.BKZ = " "), the text-property changes back to ist value before deletion.

It Looks like the BO sets back ist original value before editing to the control, but why? Because I request the value of another Combobox?

Can anyone explain this to me?

Thanks in advance

Thomas








By Edhy Rijo - 12/3/2014

Hi Thomas,
It may be difficult to fully understand your issue without a video, but I will try.

Couple of questions about your combobox:
  1. Is the cmbbkz combobox binded to the bbo.BKZ?
  2. What is the PopulationType used?
If the cmbbkz is binded to the bbo, then you don't need to do any testing or assignment, the SF combobox is binded via the "SelectedValue" property, not the cmbbkz.Text.

By Thomas Holste - 12/4/2014

Hi Edhy,

all combo-bpxes are populated by a BO. The main question is, why the text-property of one Combo changes back to its original value  when the value of another  bo-field bound to a another combo-box is assigned.

Funny enough this does not happen if I assign a value to a bo-field not used by a combo-box.

Best regards

Thomas
By Edhy Rijo - 12/4/2014

Hi Thomas,

Thomas Holste (12/4/2014)
The main question is, why the text-property of one Combo changes back to its original value  when the value of another  bo-field bound to a another combo-box is assigned.

Well, it is very difficult to answer that without seeing your code or a video of your form with the issue.  In cases like this with weird behaviors I tend to go to the basics of how the combobox is defined and see if something may have been missed, that is the reason I asked those questions before.
By Trent L. Taylor - 12/4/2014

Thomas, what are you trying to accomplish?  More than likely the text is being trimmed since there is no other text other than a space.
By Thomas Holste - 12/4/2014

Hi Trent, Hi Edhy,

I noticed this behaviour and was curious why this happens. As I solved my problem in a different way, it is not too important for me. When I have a little bit more time I'll write a Little test-app and come nack with this.

Thanks ro you all for your help

Thomas