Hi Ting,
Greetings from Syncfusion Support,
From your update, we could understand that you like to display the value inside the Numeric Textbox without commas (,) and decimals (.). We can restrict to type the decimal points in a NumericTextBox by using the validateDecimalOnType and decimals properties of NumericTextBox. We have prepared a sample and achieve your requirement. Please refer the below code example and sample for more information.
|
<ejs-grid id="Grid" dataSource="ViewBag.dataSource" allowPaging="true" >
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true"></e-grid-editSettings>
<e-grid-pagesettings pageCount="5"></e-grid-pagesettings>
<e-grid-columns>
<e-grid-column field="OrderID" headerText="Order ID" validationRules="@(new { required=true})" isPrimaryKey="true" textAlign="Right" width="100"></e-grid-column>
<e-grid-column field="CustomerID" headerText="Customer Name" validationRules="@(new { required=true})" width="140"></e-grid-column>
<e-grid-column field="Freight" headerText="Freight" textAlign="Right" editType="numericedit" format="C2" edit="@(new { @params = new Syncfusion.EJ2.Inputs.NumericTextBox() {
ValidateDecimalOnType = true,
Decimals = 0,
Format = "#"
}
})" width="100"></e-grid-column>
<e-grid-column field="OrderDate" headerText="Order Date" editType="datepickeredit" format="yMd" width="120"></e-grid-column>
<e-grid-column field="ShipCountry" headerText="Ship Country" editType="dropdownedit" width="140"></e-grid-column>
</e-grid-columns>
</ejs-grid>
|
Screenshot:
Please get back to us if you need further assistance.
Regards,
Rajapandi R