The JSON format required by DHTMLX Grid is:
    {rows:[
        { id:1001,
     data:[
          "100",
          "A Time to Kill",
          "John Grisham",
          "12.99",
          "1",
          "05/01/1998"] },
       { id:1002,
     data:[
          "1000",
          "Blood and Smoke",
          "Stephen King",
          "0",
          "1",
          "01/01/2000"] }
    ]}

Above each "row" object contains and "id" name/value pair, and a "data"
array which contains all elements for an entire row.

I'd prefer to create a map and use Active4D's addRowSet or addSelection
macros. But these don't seem offer the required way to format the json. Part
of my requirement includes a call-back option and a relate-one feature.

It would be perfect (Aparajita) if I could map into an array:
$map{"id"} := ->[employee]id
$map{"data"} := ->[employee]dob + >[employee]firstname +
->[employee]lastname

It seems like I'm going to have to roll-my-own, but I thought I'd through
this out before I do.

What I'm really doing is using the XML grid definition to define all
requirements for the both the grid and the data map, and extracting the map
info from the grid XML. It just makes sense to define all the grid
requirements in the same document.

->[table]field1:columnName1
->[table]field2:columnName2
->[table]field3:columnName3

Thanks in advance for your suggestions!

David Ringsmuth


_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

Reply via email to