This topic is locked

Pasting Commas into Numeric Fields

9/5/2019 1:17:29 PM
ASPRunner.NET General questions
J
jetsguy author

Is there a way to paste a value that has commas into a field that is a numeric field on the database? I've noticed that when you enter a number eg: 123,456 into a field in ASPRunner the number stored in the database will be 123.456. It somehow interprets the comma as a decimal. How can I change this behavior?

admin 9/5/2019

When you enter/paste 123,456 into that field, what value do you actually mean?

J
jetsguy author 9/6/2019



When you enter/paste 123,456 into that field, what value do you actually mean?


My example is that I would like to enter 123,456 and have the page essentially remove the comma such that the field will save the value 123456. I notice by default when you enter 123,456 the page by default stores the number 123.456.

admin 9/7/2019

I see what you saying. Your best bet is to implement a field event that would read the field content after each change and remove all commas.
More info:

https://xlinesoft.com/asprunnernet/docs/field_events.htm

J
jetsguy author 9/10/2019



I see what you saying. Your best bet is to implement a field event that would read the field content after each change and remove all commas.
More info:

https://xlinesoft.com/asprunnernet/docs/field_events.htm


Thanks for this....of course I'm trying to do this with inline edit which does not have field events. Hmmm. is there any way to accomplish this with inline edit?

admin 9/10/2019

It surely does work with inline edit as well.