gijgo
gijgo copied to clipboard
How can I bind complex object
This is my Json
[{ "dataType": "text", "lastModifiedDate": "2021-02-11T10:03:41.874Z", "name": "/dev/app-name/new-param", "selector": null, "sourceResult": null, "type": { "value": "SecureString" }, "value": "old value new", "version": 2 }
How can I bind "type":{"value":"SecureString"} to column Type
$(document).ready(function () {
var grid = $('#grid').grid({
dataSource: '/Index?handler=Parameters',
columns: [
{ field: 'name', title: 'Parameter Name', sortable: true },
{ field: 'value', title: 'Value'},
{ field: 'type.value', title: 'Type'}, //This is not working
{ field: 'version', title: 'Version' }
],
pager: { limit: 5 }
});
});
Have you tried column renderer
{ field: 'type', title: 'Type', renderer: function (value, record) {return type.value; } },