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.

Sample for editors

Thread ID:

Created:

Updated:

Platform:

Replies:

119015 May 5,2015 08:45 AM May 7,2015 03:08 AM JavaScript 1
loading
Tags: General
Edgar Ricardez Peralta
Asked On May 5, 2015 08:45 AM

Hi Syncfusion, 

Please add example of how to get/set values for editors HTML5/JavaScript controls for another event. For example when I click button. The editors controls may be initialized when the page is ready. 

Thanks

Harikrishnan P [Syncfusion]
Replied On May 7, 2015 03:08 AM

Hi Edgar,

Thanks for using Syncfusion products.

Query: Please add example of how to get/set values for editors HTML5/JavaScript controls for another event. For example when I click button. The editors controls may be initialized when the page is ready.

We would like to inform you that, each of our components properties can be set or get dynamically. For editor components we have a property called ‘value’. Using this property we can set/get the values of editor components. Please refer the following code,


<script type="text/javascript">

var currencyObj;

$(function () {

$("#currency").ejCurrencyTextbox(

{

name: "currency"

});

//Object for currency textbox created

currencyObj = $("#currency").data("ejCurrencyTextbox");


});



function setValue() {

//Value is set to the currency textbox

currencyObj.option("value", 500);

//Value obtained from EJ currency textbox

var currencyValue = currencyObj.option("value");

alert("Currency textbox value is: " + currencyValue);

}

</script>


Similarly for other editors like numeric, percentage or any other textbox components we can set/get the values using the ‘value’ property. For your convenience we have attached a sample in the following location.

Sample Location : Editor Sample

You can refer the following online documentation to know about the general syntax for getting and setting the properties.

http://help.syncfusion.com/ug/js/Documents/accessingthecomponentpropertiesdynamically.htm
Please let us know if you have further queries.

Regards,
HariKrishnan

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.

;