institut-de-genomique / Ultimate-DataTable

This AngularJS directive generate a HTML table with build-in fonctionnality like save, edit, remove, pagination etc...
http://institut-de-genomique.github.io/Ultimate-DataTable/
45 stars 26 forks source link

Access other properties of object inside 'render' of column #30

Closed AviShmueli closed 8 years ago

AviShmueli commented 8 years ago

Hi, Can I render to column other value besides the value that I pass to the column in "property"? what I need is to render the name of the object inside "" tag that href to URL with the id of the object as a parameter. How can I do that?

This is what i need: "columns": [{ "header": "Name", "property": "ItemName", "order": true, "type": "text", "showFilter": true, "groupMethod": "collect", "render": "<a target='blank' ng-href='/Catalog/Item/#/?ItemId={{**ItemId**}}'>{{cellValue}}</a>", "hide": true },...

Thanks.

galbini commented 8 years ago

Hi,

You can access at the whole object with variable "value.data" in your case :

"render": "<a target='blank' ng-href='/Catalog/Item/#/?ItemId={{value.data.ItemId}}'>{{cellValue}}</a>"

Best regards, Guillaume

AviShmueli commented 8 years ago

Thank you, man! Great tool, by the way...