JSFiddle - React, Tailwind, and code Playground

by psoares

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.1/dojox/grid/resources/claroGrid.css">
<div id="target-node-id"></div>

JavaScript

function fmtValues(values) {
    console.debug(values);
    return "***" + values + "***";
}

dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dojox.grid.DataGrid");

dojo.ready(function() {
    dataStore = new dojo.data.ItemFileReadStore({
        data: {
            id: 'id',
            label: 'id',
            items: [
                {
                id: "value1",
                values: ["a", "b", "c"]},
            {
                id: "value2",
                values: "foo"}
            ]
        }
    });
    console.debug(dataStore);
 

    grid = new dojox.grid.DataGrid({
        store: dataStore,
        structure: [
            {
            name: "ID",
            field: "id",
            width: "200px"},
        {
            name: "Values",
            field: "values",
            width: "200px",
            formatter: fmtValues}
        ]
    }, "target-node-id");
    grid.startup();
});