Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
New Member
Posts: 7
Registered: ‎10-06-2011

Numeric Control with AutoPostBack?

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?

 

Thanks,

Drew

Nickel Contributor
Posts: 59
Registered: ‎07-30-2010

Re: Numeric Control with AutoPostBack?

Hello Drew,

 

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.

 

Thanks,

Richard Anderson

Richard Anderson
CRM Consultant
K3 CRM
New Member
Posts: 7
Registered: ‎10-06-2011

Re: Numeric Control with AutoPostBack?

Thanks Richard,

 

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.

 

Thanks,

Drew