Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Event ValueChanged not raised when edit item
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Event ValueChanged not raised when edit item

 Post Reply Post Reply
Author
Message
Peter59 View Drop Down
Groupie
Groupie


Joined: 19 July 2007
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote Peter59 Quote  Post ReplyReply Direct Link To This Post Topic: Event ValueChanged not raised when edit item
    Posted: 20 February 2009 at 12:55am
Hello,

I try to give my users the opportunity to edit a large quantity of values - in the attached example the actual stock after an inventory. Every value has to be confirmed wether it is equal to the nominal stock or not to get a feedback, what is booked (value entered) already.

My idea was to set the item.value in column "actual stock" to -1, but item.caption to 0 and update the according database record in the ValueChanged event.

But ValueChanged is not raised, when the user enters the same "value" (item.caption) as displayed, although item.value is different.

Is ValueChanged event in real a "CaptionChanged" event?  
uploads/20090220_005405_Test_ItemEdit.zip
See attached example.

Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2009 at 4:08am
Hi Peter,
 
If you look into ValueChanged event you will see that Item.Value is indeed the value you entered in ReportItem.
 
If you would add: MsgBox Item.Value & " - " & Item.Caption (in ValueChanged event) and you will see that Item.Value contains value you entered and if you close msgbox the value will be the same as before. So it looks like the value is lost or doesn't update Caption ???
 
You could add in ValueChanged event: Item.Caption = Item.Value and now you see the value gets updated.
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Peter59 View Drop Down
Groupie
Groupie


Joined: 19 July 2007
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote Peter59 Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2009 at 4:34am
Hi Aaron,

thanks for spending your time with my problem.

Yes of course (and I noticed it already), ValueChanged is raised, when I enter a different value than the one displayed!

But did you try to enter the same value? In detail:
  • Item.Value = -1
  • Item.Caption = 0
  • Enter EditMode
  • Press 0
  • Hit the Enter-key
No event ValueChanged is raised!

Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2009 at 6:59am
Hi Peter,
 
When you edit item and value is the same, why fire ValueChanged event? It works like it should.
 
What are you trying to accomplish anyway? Maybe there is another way 
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
Peter59 View Drop Down
Groupie
Groupie


Joined: 19 July 2007
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote Peter59 Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2009 at 7:18am
Hi Aaron,

ok, it was a long week for all of us, we are awaiting the weekend and sometimes things are difficult to understand

Did you read carefully my above example? Item.Value is -1, entered string is 0. I expected the ValueChanged event raised.

I try to ask my question in another way (in awaiting an answer from support team)

When Edit mode is entered, what do I change: the value or the caption of the item?

Thanks for dicussing my problem,
Peter
Product: Xtreme SuitePro (ActiveX) version 15.2.1
Platform: Windows 7 64 Bit
Language: Visual Basic 6.0 SP6
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.