Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142961 | Feb 26,2019 12:24 PM UTC | Feb 28,2019 04:48 AM UTC | ASP.NET Core | 3 |
![]() |
Tags: Grid |
<script type="text/x-jsrender" id="columnTemplate">
{{if Verified}}
<a class="btn btn-info" rel='nofollow' rel='nofollow' rel='nofollow' href="/ServicesOrder/Detail/{{:ServicesOrderId}}">Detail</a>,<a class="btn btn-sucess">Finish</a>
{{else}}
<a class="btn btn-info" rel='nofollow' rel='nofollow' rel='nofollow' href="/ServicesOrder/Detail/{{:ServicesOrderId}}">Detail</a>,<a class="btn btn-danger">In progress</a>
{{/if}}
</script>
<div id="Grid"></div>
<script type="text/javascript">
$(function () {
$("#Grid").ejGrid({
// the datasource "window.employeeView" is referred from jsondata.min.js
dataSource: window.gridData,
allowPaging: true,
pageSettings: { pageSize: 4 },
columns: [
{ field: "OrderID", headerText: "Order ID", isPrimaryKey: true, textAlign: ej.TextAlign.Right, width: 90 },
{ field: "CustomerID", headerText: "Customer ID", width: 150 },
{ field: "EmployeeID", headerText: "Employee ID", textAlign: ej.TextAlign.Right, width: 100 },
{ field: "OrderDate", headerText: "Order Date", textAlign: ej.TextAlign.Right, width: 100, format: "{0:MM/dd/yyyy}" },
{ field: "Freight", headerText: "Freight", textAlign: ej.TextAlign.Right, format: "{0:C}" },
{ field: "Verified", headerText: "Verified", width: 100 },
{ headerText: "Employee Image", template: "#columnTemplate", textAlign: "center", width: 110 },
]
});
});
</script> |
<script type="text/x-jsrender" id="columnTemplate">
{{if Verified && CustomerID == "VINET"}}
<a class="btn btn-info" rel='nofollow' rel='nofollow' rel='nofollow' href="/ServicesOrder/Detail/{{:ServicesOrderId}}">Detail</a>,<a class="btn btn-success" >Finish</a>
{{else}}
<a class="btn btn-info" rel='nofollow' rel='nofollow' rel='nofollow' href="/ServicesOrder/Detail/{{:ServicesOrderId}}">Detail</a>,<a class="btn btn-danger" >In progress</a>
{{/if}} </script> |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.