Can a numeric editor be used for a text field in sfDataForm ?

I have a field in my class which is declared as string.  It is sometimes used by users to store a number, in which case they'd like to be able to use the numeric editor type. 
I was able to set that up, with a setting (unrelated to and outside of the dataform) that says for this field, show the numeric editor. 
But I have found that if  the numeric editor is used, my string field is not populated.
It edits and shows up in the dataform, but the field in my class is blank. 

Do you know of a way to make this possible ?  I'd be OK with casting the numeric value (if accessible) to a string for my purpose, but I'm not sure where this would be done. Do you have any ideas ?

Thanks,
John



3 Replies 1 reply marked as answer

LN Lakshmi Natarajan Syncfusion Team July 13, 2020 10:05 AM UTC

Hi John, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “Can a numeric editor be used for a text field in sfDataForm” from our end. We would like to inform you that the NumericTextEditor does not support the string data type. So, we suggest you to use DataFormTextEditor to use both text and numeric data types.  
 
Note: You need to convert numeric value as string. 
 
You can also refer our user guidance document regarding the editors and supported data types from the following link, 
 
Also, you can also customize the existing editors to convert the values, 
 
Please let us know if you need further assistance. 
 
Regards, 
Lakshmi Natarajan 
 


Marked as answer

JO John July 13, 2020 11:39 PM UTC

OK, thank you for your answer.

I do appreciate how great a job you guys do in responding to questions.
Thanks,
John



LN Lakshmi Natarajan Syncfusion Team July 14, 2020 05:16 AM UTC

Hi John, 
 
Thanks for your reply. 
 
Please let us know if you need further assistance. As always we are happy to help you out. 
 
Lakshmi Natarajan 
 


Loader.
Up arrow icon