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

How i can get value in numeric textbox (ej:NumericTextBox) from JS?

Thread ID:





131935 Aug 3,2017 10:46 AM UTC Aug 4,2017 12:44 PM UTC ASP.NET MVC 1
Tags: NumericTextbox
Asked On August 3, 2017 10:46 AM UTC

How can I alert the NumericTextBox value?

<ej:Dialog ID="Dialog199" Title="Sample" runat="server">
            <br />
            Your dialog contents here 
            <br />
            <ej:NumericTextBox runat="server" ID="num1" Value="3"></ej:NumericTextBox>
            <br />
            <ej:Button runat="server" ID="button1" Text="OK" ClientSideOnClick="btnOK"></ej:Button>
            <ej:Button runat="server" ID="button2" Text="Cancel"></ej:Button>

<script type="text/javascript">

    function btnOK() {

        var dialogObj = $("#<%=Dialog199.ClientID%>").data("ejDialog");

        var num1Obj = $("#<%=num1.ClientID%>").ejNumericTextBox("instance");
        alert(num1Obj.value()); ???



Kaviyarasu Sivasenapathi [Syncfusion]
Replied On August 4, 2017 12:44 PM UTC

Hi Tomer, 
Thanks for contacting Syncfusion support. 
We have analyzed your query (“Not able to get the numeric textbox value”). You can achieve your requirement by using getValue() method of “NumericTextbox” component. Please refer the below code block. 
<div id="ControlRegion"> 
    <div class="control"> 
            @Html.EJ().Button("ok").Text("OK").ClientSideEvents(evt => evt.Click("btnOK")).Width("70px").Height("30px") 
    function btnOK(args) { 
        var dialogObj = $("#basicDialog").data("ejDialog"); 
        var num1Obj = $("#numeric").data("ejNumericTextbox"); 
        alert("current value is: " + num1Obj.getValue()); 
For your convenience, we have attached the sample below.  
To know more details about getValue() method, please refer the following documentation link  
Please let us know if you need further assistance on this. 
Kaviyarasu S   


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