07-16-2012 04:20 PM
I'm trying to use a numeric control with the AutoPostBack property set to true, and when the value is changed and the control loses focus, the page is NOT being posted back to the server. After spending some time with the client side debugger, it appears that the control isn't rendered with an ONCHANGE event handler, so when the validate() function is called from the ONBLUR handler, the code (in sage-controls.js) that checks 'this.justChanged&&this.autoPostBack' always fails because justChanged is never set to true even though the value HAS changed. The Currency control appears to use the same client-side validation process (with different validation obviously), but that control gets rendered with an OnChange event handler and posts back as expected.
Anybody else seen this and know of a way to workaround it? Maybe somehow inject an onchange handler into the rendered HTML or attach the handler through some other code? Is this a known issue with Sage?
07-17-2012 01:03 AM
We noticed a defect with the numeric control not rendering correctly if it is unbound, as in the value entered into the control is not readable via c# on a postback unless the control is bound to a field in the database. This could be your issue here, is your numeric control unbound?
I don't have the defect number to hand at the moment but I will try to track it down for you.
07-17-2012 08:21 AM
Well, it's a custom form, not a quick form, but I am binding the Text property of the numeric control to an entity property defined as an Integer (a custom Opportunity extension entity) in an overridden OnAddEntityBindings method in the code behind. I am using the TypedWebEntityBindingGenerator code to create the bindings (from http://community.sagesaleslogix.com/t5/The-Sage-SalesLogix-Journal/Step-by-Step-Guide-to-Custom-Form....
Let me know if you need any more information.