i have set combo -to default data ( via ajax return json data ) i need these data parse to dataview, how do i make it to add and parse these data into my dataview?
i get i need data by “JSON.stringify(this.getItem(id))” (for example:{“DEPT_ID”:“5431”,“DEPT_CODE”:“AA0”,“PARENT_ID”:“4351”,“DEPT_LEVEL”:“50”,“SUPERVISOR_ID”:“yangying”“id”:1542161934425})
and when i use $$(‘dataview2’).add(JSON.stringify(this.getItem(id))
i get ‘undefined’ back
but when i use $$(‘dataview2’).add({“DEPT_ID”:“5431”,“DEPT_CODE”:“AA0”,“PARENT_ID”:“4351”,“DEPT_LEVEL”:“50”,“SUPERVISOR_ID”:“yangying”“id”:1542161934425})
i get correct data back
how can i use “JSON.stringify(this.getItem(id))” to add my dataview get correct data back?