KoGrid icon indicating copy to clipboard operation
KoGrid copied to clipboard

Added mechanism that allows to use function to generate field values

Open bennidi opened this issue 12 years ago • 0 comments

In my project I needed to bind KoGrid to a more complex json structure. Specifically I needed to access arrays and do some other computation that was not possible using simple string based path expressions.

It's now possible to pass a function as field value generator, like this:

{field: {alias: "to", accessor: function(item) {return item.to[0].address}}, displayName: 'To'}

This also allows for different values to be displayed, based on arbitrary conditions.

bennidi avatar Mar 07 '13 10:03 bennidi