BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<ejs-grid id="Grid" allowPaging="true" dataSource="@ViewBag.DataSource" toolbar="@(new List<string>() {"Add", "Edit", "Delete", "Cancel", "Update"})">
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Batch"></e-grid-editSettings>
<e-grid-columns>
. . . .
<e-grid-column allowSorting="true" field="Freight" headerText="Freight" validationRules="@(new { required=true})" Format="p0" textAlign="Right" editType="numericedit" width="120" edit="@(new {create = "create", read = "read", destroy = "destroy", write = "write"})"></e-grid-column>
</e-grid-columns>
</ejs-grid>
<script>
var elem;
var dObj;
function create(args) {
elem = document.createElement('input');
return elem;
}
function write(args) {
debugger
dObj = new ej.inputs.NumericTextBox({
value: args.rowData.Freight * 100, // maintain the value in format
format: "p0",
step: 10,
min: 0,
max: 6000
});
dObj.appendTo(elem);
document.getElementById('GridFreight').addEventListener('blur', formBlur);
}
function destroy() {
dObj.destroy();
}
function read(args) {
return dObj.value;
}
formBlur = function () {
this.ej2_instances[0].value = this.ej2_instances[0].value / 100;
}
</script> |