Hi all,
I'm using on some fields in datawindow dropdown calendar. If I choose date from calendar then event ItemChanged on datawindow is fired, but when I type date manualy into field and tab out from that field, then ItemChanged event is not fired.
Is there some workaround to be able to react on both type of changed value?
Thank you Ales
P.S. I'm using PB2019R3
EDIT:
In case that someone will face the same problem.
Problem was not in using editchanged event, but in using SetItem and hoping that ItemChanged will be fired.
When I changed SetItem to SetText, everything working now.
I had little break from PB (15y) so some hidden gems I forgot or may be never knew. I have to support some apps in PB which I did not develop or even know, so some bugs will be challenging for me. :-)
TY all for their time spent on helping me.
I had a little pause from PB (15 years) now I have to support few PB apps and I have to learn some things again. Some things are confusing me. I remember some hacking in PB6.5 so my bad was that this will be one of them, which has to be done.
I will try to use new pfcs, but I can imagine that transition will give me some challenges.
Again thank you a lot.
There is code in editchanged (in u_dw):
string ls_col
Integer li_rok
IF gnv_app.ii_rok > 0 THEN
li_rok = gnv_app.ii_rok
ELSE
li_rok = year (today ())
END IF
ls_col = dwo.name
if this.describe (ls_col + ".coltype") = "date" then
if right (data, 4) = "0000" and isdate (left (data, 6) + string (li_rok)) then
this.SetItem (row, ls_col, date (left (data, 6) + string (li_rok)))
end if
end if
which is filling year after typing day and month into date field.
If I comment out this code it calls ItemChanged on that field.
Is there any propper way to set year and get called itemchanged?
Thank you.
A.