gijgo icon indicating copy to clipboard operation
gijgo copied to clipboard

How can I bind complex object

Open dhirajkhodade opened this issue 4 years ago • 1 comments

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 }
            });
        });

dhirajkhodade avatar Feb 14 '21 14:02 dhirajkhodade

Have you tried column renderer

{ field: 'type', title: 'Type', renderer: function (value, record) {return type.value; } },

aravindgnair avatar Jan 04 '22 11:01 aravindgnair