Jaffer Sadiq

Jaffer Sadiq

  • NA
  • 155
  • 68k

How to get hyperlink in AngularJS UI-grid?

Sep 16 2018 6:52 AM
Hi,
 
Am using hyperlink in seperate row(Details) for the pupose of  showing pop up screen. its working fine.  But how to get hyperlink in below field data(TransactionID) itself in UI-gird. How to achieve this in AngularJS
 
Plese find the script below:
 
$scope.gridOptions = {
appScopeProvider: {
onClick: function (row) {
window.open('/TransRecord/ShowTransRecord?id="' + row + '"&cnmae="' + $scope.SelectedCustomer.Name + '"', "_blank", "height=600,width=800,toolbar=no,location=no,menubar=no,titlebar=no");
}
},
data: 'SearchGridData',
enableSorting: true,
paginationPageSizes: [25, 50, 75],
paginationPageSize: 5,
multiSelect: false,
enableRowSelection: true,
enableFiltering: false,
columnDefs: [
{
field: "TransactionID", cellTemplate: '<div class="ui-grid-cell-contents">' +
'<a ng-click="grid.appScope.onClick(row.entity.TransactionID)" > "Details" - (Here i need to show the field value(Transaction ID) </a>' +
'</div>' , width:150},
{ field: "TransactionID", width: 120 },
{ field: "Date", width: 120 },
{ field: "OrderID", width: 120 },
{ field: "OrderName", width: 120 }],
onRegisterApi: function (gridApi) {
$scope.grid1Api = gridApi;
$scope.txnid = undefined;
gridApi.selection.on.rowSelectionChanged($scope, function (row) {
TransactionId = row.entity.Transactionid
});
}
};
 
 
Thanks in advance 

Answers (1)