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.
Unfortunately, activation email could not send to your email. Please try again.

Textbox value

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi
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
        }
    }

Regards

Jon

Ashokkumar Balasubramanian [Syncfusion]
Replied On October 6, 2016 09:20 AM

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. 
 
[Script] 
              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. 
 
Regards, 
Ashokkumar B. 


Jon E
Replied On October 6, 2016 09:31 AM

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 08:36 AM

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.  
 
Regards, 
Ashokkumar B.

CONFIRMATION

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.

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.

;