We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Textbox value

Thread ID:





126272 Oct 5,2016 08:35 AM UTC Oct 7,2016 12:36 PM UTC JavaScript 3
Tags: ejMaskEdit
Jon E
Asked On October 5, 2016 08:35 AM UTC

This feels silly as I am writing it but how on earth do you set the value of a ejMaskEdit control after it has been created.  There appears to be a get stripped value function but nothing to set the value.

I have tried the following and several variants of it but no luck.  I can get the value populated on load but sometimes need to manually set them once the controls are created.

    var control = $('#' + controlId);
    if (control) {
        var ejMaskEdit = control.data('ejMaskEdit');
        if (ejMaskEdit) {
            ejMaskEdit.model.value = value



Ashokkumar Balasubramanian [Syncfusion]
Replied On October 6, 2016 01:20 PM UTC

Hi Jon, 
Thanks for using Syncfusion Products. 
We have checked your code block. It seems you are using the incorrect syntax to set the value for MaskEdit control. 
Please refer the correct syntax below. 
              var ejMaskEdit = $("#maskedit").data('ejMaskEdit'); 
              var value = "4242422424"; 
              ejMaskEdit.option({ value: value}) 
We have prepared the sample based on your requirement (“To set the value to MaskEdit control”). Please find the below link, 
To know more about the api configuration, please refer the below link. 
Please let us know if you have further queries. 
Ashokkumar B. 

Jon E
Replied On October 6, 2016 01:31 PM UTC

Great, many thanks for that clarification.  

I take it that generally changing values in the controls after they are initialised is best done like that rather than x = y?

Ashokkumar Balasubramanian [Syncfusion]
Replied On October 7, 2016 12:36 PM UTC

Hi Jon, 
Thanks for your update. 
We are glad to know that the given solution works for you. Please let us know if you need any further assistance.  
Ashokkumar B.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon