Hi guys:
I just learnt Dhtmlx touch for few hours and now I have a simple question about properties.
I can set properties at beginning, but I cannot get properties value by code why?
For example,
this is my code,
id : “grid”,
view : “grid”,
header : true,
fields : [{
id : “Name”,
label : “Name”,
}, {
id : “email”,
label : “email”,
width: 400,
}],
dataType:“JSON”,
data:[
{Name:‘a’,email:“a@gmail.com”},
{Name:‘s’,email:“s.com”},
{Name:‘h’,email:“h.com”},
]
}]
}]
Currently, I have already set the data as [{1},{2},{3}], this code is worked. Now I try to get grid’s data,I used
var strdata = $$(grid).data; however, strdata’s value is not
[
{Name:‘a’,email:“a@gmail.com”},
{Name:‘s’,email:“s.com”},
{Name:‘h’,email:“h.com”},
]
var strDatatype = $$(grid).datatype;
strDatatype’s value is unidentified.
why? why I cannot use gird’s properties directly.