Print Page | Close Window

Event ValueChanged not raised when edit item

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=13458
Printed Date: 14 November 2024 at 9:06pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Event ValueChanged not raised when edit item
Posted By: Peter59
Subject: Event ValueChanged not raised when edit item
Date 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 - 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



Replies:
Posted By: Aaron
Date 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....


Posted By: Peter59
Date 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


Posted By: Aaron
Date 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....


Posted By: Peter59
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net