Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

How to display array data in column?

$
0
0

One of my TreeList field is an array. For example:

var localData = [
{ id: 1, name: "​A Team", description: "", players:  ["a","b"], parentId: null },
{ id: 2, name: "Team Lead", description: "", players: ["c"], parentId: 1 }
];

The "players" field is an array. I configure the column like:

columns: [
{ field: "name", title: "Team", width: "350px" },
{ field: "description", title: "Description", width: "350px" },
{
title: "Players",
template: '{{ dataItem.players }}'
}]

However, the "Players" column shows like

["a","b"]

I expect it as

a, b

How do I fix it?

Thanks,


Viewing all articles
Browse latest Browse all 94857

Trending Articles