PDA

View Full Version : During AJAX call RawValue of control gets posted, Can we override that behavior?



23 May 2014, 3:28 AM
Hi,

We are using EXT.NET library within our application and have extended NumberField control. We have implemented some custom formatting (like adding % sign) within extended control. If control contains 50 as its value then raw value would be 50%. Now when we submit data from page having this custom control through AJAX, the control's raw value (e.g. 50%) is sent to server through submitdirecteventconfig. While we want to receive actual value from browser instead of raw value from control.

We have tried to override getSubTplData, getSubmitValue and processRawValue within extended control, but nothing seems to be invoked at time of AJAX call. Is there any way we can override this behavior (not send raw value from control)?

Any help would be really appreciated.
Thanks.

mitchellsimoens
27 May 2014, 9:54 AM
How is the ajax call being sent? Is it a form submit?

27 May 2014, 11:15 AM
we call server side method through direct method from client side.

mitchellsimoens
27 May 2014, 11:20 AM
Ok. Then how are you getting the field's value for the direct method call?

27 May 2014, 11:37 AM
We don't send field value explicitly from client side as method parameters. we call Ext.net.DirectMethods.abcMethod from client side code. I am new to EXT.NET so not sure whether Ext.net.DirectMethods submits entire form but when I look through fiddler it contains all my page's fields values. Please bear with me for my lack of knowledge on Ext.Net part.

mitchellsimoens
27 May 2014, 11:38 AM
Well, I'm not sure how you are doing things and Ext.NET isn't from Sencha so if there is anything custom they are doing you'd have to ask them.

28 May 2014, 12:08 AM
Thanks Mitchell.. I will try to reach out to EXT.NET and would comeback if required.