BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
@Grid @(Html.EJ().Grid<object>("DetailTemplate") . . . .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.DialogTemplate).DialogEditorTemplateID("#template"); }) .Columns(col => { col.Field("SNO").HeaderText("SNO").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(90).Add(); col.Field("quantity").HeaderText("quantity").Width(90).Add(); col.Field("Price").HeaderText("Price").TextAlign(TextAlign.Right).Width(75).Add(); col.HeaderText("total").Template("{{:quantity * Price}}").Width(85).Add(); }) .ClientSideEvents(e => e.ActionComplete("actionComplete")) ) @action complete function actionComplete(args) { //here we can bound the Numeric textbox control for qunatity and price column as well as define the change event for both if ((args.requestType == "beginedit" || args.requestType == "add") && args.model.editSettings.editMode == "dialogtemplate") { $("#quantity").ejNumericTextbox({ value: $("#quantity").val(), change: "quantityChange" }); $("#Price").ejNumericTextbox({ value: $("#Price").val(), change: "PriceChange" }); } } @quanity change event function quantityChange(args) { var price = +($("#Price").val()); // get the current value from input field var quantity = +(args.value); var total = price * quantity; $("#Total").val(total); } @price change event function PriceChange(args) { var price = +(args.value); // get the current value from input field var quantity = +($("#quantity").val()); var total = price * quantity; $("#Total").val(total); } |