BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
<script type="text/template" id="product">
<input type="text" id="dtp_start" name="dtp_start" value="{{:dtp_start}}" class="e-field e-ejinputtext valid"/></script>
<script type="text/template" id="template">
<b>Order Details</b>
<table cellspacing="10">
<tr>
. . .
<tr>
<td style="text-align: right;">ShipName
</td>
<td style="text-align: left">
<input id="ShipName" name="ShipName" placeholder="ship name" class="e-field e-ejinputtext valid"
style="width: 116px; height: 28px" value="{{:ShipName}}" />
</td>
. . .
</tr>
</table>
</script> |
@Grid
<ej:Grid runat="server" ID="Grid" AllowPaging="true" >
<ClientSideEvents ActionComplete="complete" />
<Columns>
. . .
</Columns>
. . .
</ej:Grid>
@actionComplete event
function complete(args) {
if ((args.requestType == "beginedit" || args.requestType == "add") && args.model.editSettings.editMode == "dialogtemplate") {
$("#Freight").ejNumericTextbox({ value: parseFloat($("#Freight").val()), width: "116px", height: "28px", decimalPlaces: 2 });
$("#EmployeeID").ejNumericTextbox({ value: $("#EmployeeID").val(), width: "116px", height: "28px" });
$("#ShipCountry").ejDropDownList({ width: '116px' });
if (args.requestType == "beginedit") {
$("#OrderID").attr("disabled", "disabled");
$("#ShipCountry").ejDropDownList("setSelectedValue", args.row.children().eq(4).text());
}
}
} |
function complete(args) {
if (args.requestType == "refresh" || args.requestType == "save") {
$("#date").ejDatePicker({ dateFormat: "MM/dd/yyyy" });
}
if ((args.requestType == "beginedit" || args.requestType == "add")) {
$("#date").ejDatePicker({ dateFormat: "MM/dd/yyyy", watermarkText: "Date", height: 35, width: 200 }); //Modified code example
}
}
</script> |