dhtmlxgrid doesn't dispaly data...

so – I’m trying to use your grid, and it looks really cool, but I can’t get data to load.



See :











































What is Your Intention?





Enter the Information for this month’s Purpose.



Enter your purpose, what you’re willing to risk for it, and your deadline.







Deadline :







What is your purpose for the month?







What are your willing to risk to acheive this?
























You code seems right. Please check if you JSON structure is correct. Or try to load data to grid with JSON string:


dGrid.parse(JSON.stringify(JSONObj), ‘json’)


If issue still occurs please contact support@dhtmlx.com and provide sample where this issue occurs included files which you are using to initialize grid.


Please note, loaded data from JSON supported from dhtmlxGrid version. 1.6+

I am having the same problem as this user had. I am using version 2.6 pro and I have included the dhtmlxgrid_json.js file. The grid renders the correct number of rows, but no data is seen in the rows.

My code is as follows:

function initGrid() {
// declaration of grid
var grid = new dhtmlXGridObject({
parent:‘mappingUIGrid’,
image_path:’/mdata/codebase/dhtmlxgrid_pro_full/imgs’,
skin:‘light’,
columns:[
{label:‘Type’,
type:‘ro’,
sort:‘str’,
align:‘left’,
width:‘100’
},
{label:‘Orignal Name’,
type:‘ro’,
sort:‘str’,
align:‘left’,
width:‘250’
},
{label:‘Automapped Name’,
type:‘ro’,
sort:‘str’,
align:‘left’,
width:‘250’
},
{label:‘Manually Mapped Name’,
type:‘co’,
sort:‘str’,
align:‘left’,
width:‘250’
},
{label:‘Notes’,
type:‘ed’,
sort:‘str’,
align:‘left’,
width:‘150’
},
{label:‘Approval’,
type:‘ch’,
sort:‘str’,
align:‘center’,
width:‘100’
}
]
});
grid.init();

//inital load URL
var remUrl = "/mdata/manager/drugmapping/?paramAction=doPharmacyXpert&cmd=viewByAll";
parent.console.log("Url is: " + remUrl);

dojo.xhrGet({
	url: remUrl,
	load:function(response,ioargs){
			newDatatoJson = eval('(' + response + ')');
			parent.console.log(newDatatoJson);
			parent.console.log(newDatatoJson.rows[1].data[0]);
			grid.parse(newDatatoJson,"json");
		},
	error: function() {alert("No data returned");},
	sync:true,
	preventCache:true
});

}

My response is as follows:
{“rows”:[{“id”:1,“data”:[“Medications”,“CIPRO”,"","","",0]},{“id”:2,“data”:[“Medications”,“ASPIRIN”,“Aspirin”,"","",0]},{“id”:3,“data”:[“Medications”,“WELLBUTRIN”,“Wellbutrin”,"","",0]},{“id”:4,“data”:[“Medications”,“CODEINE”,“Codeine”,"","",0]},{“id”:5,“data”:[“Medications”,“VALIUM”,“Valium”,"","",0]},{“id”:6,“data”:[“Medications”,“FLONASE”,“Flonase”,"","",0]},{“id”:7,“data”:[“Medications”,“PAXIL”,“Paxil”,"","",0]},{“id”:8,“data”:[“Medications”,“AMBIEN”,“Ambien”,"","",0]},{“id”:9,“data”:[“Medications”,“ZYRTEC”,“Zyrtec”,"","",0]},{“id”:10,“data”:[“Medications”,“VIOXX”,“Vioxx”,"","",0]},{“id”:11,“data”:[“IV Medications”,“AMBIEN”,"","","",0]},{“id”:12,“data”:[“IV Medications”,“ASPIRIN”,"","","",0]},{“id”:13,“data”:[“IV Medications”,“CODEINE”,"","","",0]},{“id”:14,“data”:[“IV Medications”,“CIPRO”,"","","",0]},{“id”:15,“data”:[“IV Medications”,“FLONASE”,"","","",0]},{“id”:16,“data”:[“IV Medications”,“PAXIL”,"","","",0]},{“id”:17,“data”:[“IV Medications”,“VIOXX”,"","","",0]},{“id”:18,“data”:[“IV Medications”,“WELLBUTRIN”,"","","",0]},{“id”:19,“data”:[“IV Medications”,“ZYRTEC”,"","","",0]},{“id”:20,“data”:[“IV Medications”,“VALIUM”,“Valium”,"","",0]},{“id”:1000,“data”:[“Allergies”,“SHELLFISH”,“SHELLFISH”,"","",0]},{“id”:1001,“data”:[“Allergies”,“MILK”,“MILK”,"","",0]},{“id”:1002,“data”:[“Allergies”,“CHOCOLATE”,“CHOCOLATE”,"","",0]},{“id”:1003,“data”:[“Allergies”,“MORPHINE”,“MORPHINE”,"","",0]}],“pos”:0}