div ng-app="employeeView"> <div ng-controller="GridCtrl"> <div ej-grid id="Grid" e-width="500px" e-datasource="data" e-allowsorting="true" e-allowpaging="true" e-actionbegin="actionBegin" e-columns="columns" e-editsettings-allowadding="true" e-editsettings-allowediting="true" e-editsettings-allowdeleting="true" e-toolbarsettings-showtoolbar='true' e-toolbarsettings-toolbaritems='tools' e-editsettings-editmode="inlineformtemplate" e-editsettings-inlineformtemplateid="#template" > </div> </div> </div>
<script type="text/x-jsrender" id="columnTemplate"> <a rel='nofollow' href="http://syncfusion.com/">{{:ShipCountry}}</a> </script>
<script> angular.module("employeeView", ["ejangular"]) .controller("GridCtrl", function ($scope) {
//Provide the datasource to the grid. Here the WebApiAdaptor is used. $scope.data = window.gridData;
$scope.tools = ["add", "edit", "delete", "update", "cancel"];
$scope.columns = [ { field: "ShipCountry", headerText: 'HyperLink', template:true, templateID:"#columnTemplate", textAlign: ej.TextAlign.Center, width: 115 }, { field: "OrderID", headerText: 'Order ID', isPrimaryKey: true, textAlign: ej.TextAlign.Right, width: 115 }, { field: "CustomerID", headerText: 'Customer ID', textAlign: ej.TextAlign.Left, width: 150, }, { field: "EmployeeID", headerText: 'Employee ID', textAlign: ej.TextAlign.Right, width: 115 }, { field: "Freight", headerText: 'Freight', textAlign: ej.TextAlign.Right, editType : ej.Grid.EditingType.Numeric, width: 115 }, ] }); </script>
<script id="template" type="text/template"> <b>Order Details</b> <table cellspacing="10"> <tr>
<td style="text-align: left"> <input id="OrderID" name="OrderID" value="{{: OrderID}}" disa disabled="disabled" class="e-field e-ejinputtext valid e-disable" style="text-align: right; width: 233px; height: 28px" /> </td> <td style="text-align: left"> <input type="text" id="ShipCountry" name="ShipCountry" value = {{:ShipCountry}} /> </td>
<td style="text-align: left"> <input type="text" id="EmployeeID" name="EmployeeID" value = {{:EmployeeID}} /> </td> <td style="text-align: left"> <input type="text" id="CustomerID" name="CustomerID" value={{:CustomerID}} /> </td> </tr> </table>
|
Hi Richard,
We are happy that the provided suggestion helped you.
Please get back to us if you need any further assistance.
Regards,
Jayaprakash K.