Hi,

I went down this road when I started with DHTMLX and was unable to get the JSON 
interface to work properly.

I was able to match the structure of the JSON as documented, but it did not 
render. I went with XML and some javascript config commands instead. I suggest 
hand editing some JSON to match the docs and getting it work before taking the 
time to code it further. I came to the conclusion that some of the JSON 
interface just didn't work yet as documented.

The config commands can be submitted in the JSON (or XML), but they also can be 
called via javascript, and that might be the way to go. 

Let me know if you get it working. I'd be interested.


Tom D


On Dec 28, 2010, at 10:52 AM, David Ringsmuth wrote:

> 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/
> 

_______________________________________________
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