Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PB 11.5 DW Computed column does not update value right away

Status
Not open for further replies.

LunaRoja

Programmer
Sep 21, 2010
34
US
Hello,

I have a datawindow with a computed column on it. I also have a ddlb outside the datawindow.

What I expect to happen:
1) User selects an item from the ddlb.
2) Code in the selectionchanged event modifies a column which is a component of the computed column.
3) The computed column displays a new value.

What happens:
1) User selects an item from the ddlb.
2) Code in the selectionchanged event modifies a column which is a component of the computed column.
3) Nothing changes (at least visually).
4) I click on any object except the ddlb and the computed column displays the new value.

It is almost acting like a dw column which needed an accepttext() call. But the ddlb is external to the datawindow and the value being sent to the datawindow is correct. The computed column just does not appear to be computing until a control which is not the ddlb receives focus.

I have poked around and tried a number of ways to solve this, but I think I may not know the right question to ask.

Any help would be greatly appreciated.

Thanks,

LR
 
okay, as you said, doing a dw_1.AcceptText() does not help ???


what should do the trick if that doesn't work probably is:
--------------------
dw_1.setredraw(true)
or
dw_1.sort()
or
dw_1.groupcalc()

// recalculates computed columns if there's no 'moving around' in the dw of 'cursor focuses'


regards,
Miguel L.
 
Thank you very much!

The SetRedraw worked great.

LR
 
De nada ... ;)

Probably the column that is involved in the contents of your computed column is not visible?? I imagine, that means that PB is not interpretting that it has to redraw the datawindow automatically, since the changed value (setitem() column) is not visible anyway.



regards,
Miguel L.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top