Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ng-grid
Message
From
21/10/2014 15:00:52
John Baird
Coatesville, Pennsylvania, United States
 
General information
Forum:
Javascript
Category:
Other
Title:
Miscellaneous
Thread ID:
01606738
Message ID:
01609727
Views:
87
This message has been marked as the solution to the initial question of the thread.
>>>Hi everybody,
>>>
>>>I am looking at the documentation for ng-grid
>>>
>>>http://angular-ui.github.io/ng-grid/
>>>
>>>I have a column which is datetime and I don't like the display of the date in SQL Server format.
>>>
>>>Is there a simple way to fix it?
>>>
>>>This is the grid definition:
>>>
>>>
>>>  $scope.gridOptions = {
>>>                    data: 'currentItem.itemHistory',
>>>                    //showFooter: true,
>>>                    columnDefs: [
>>>                    { field: 'dateTime', displayName: 'Date Time', width: 150, resizable: true, sortable: true },
>>>                    { field: 'fieldname', displayName: 'Field Name', width: 120, resizable : true, sortable: true },
>>>                    { field: 'change', displayName: 'Change' },
>>>                    { field: 'operator', displayName: 'Operator', resizable: true, sortable: true },
>>>                    {field: 'salespoint', displayName: 'Sales Point', resizable: true, sortable: true  }]
>>>                    //,plugins: [new ngGridFlexibleHeightPlugin()]
>>>                };
>>>
>>>(I've just added risizable and sortable).
>>>
>>>Thanks in advance.
>>>
>>>UPDATE. Looking a bit closer and with some luck and google search found the solution:
>>>
>>>
>>> { field: 'dateTime', displayName: 'Date Time', width: 150, resizable: true, sortable: true, cellFilter: "date: 'medium'" },
>>
>>You could use any custom format : https://docs.angularjs.org/api/ng/filter/date
>
>Do you know how to set a column to be a link? I know I need to use cellTemplate but don't know the exact syntax.
>
>Thanks a lot in advance.

do you ever google on your own before posting? http://stackoverflow.com/questions/18310007/add-html-link-in-anyone-of-ng-grid
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform