Hi
For some purpose I’m making ajax call as below..
var localData = new Array();
$.ajax({
type : “POST”,
url : ‘/dataServlet?action=Details’,
data : ‘orderNo=12345’,
success : function(data) {
var obj = eval (“(” + data + “)”);
alert(data);
localData = obj.productList;
},
error:function(){
alert(‘Oops!!! error …’);
}
});
which return “data” as follows .. and i need to assign “”productList” to the grid …
{
“poNumber”: “X”,
“poDate”: “0000-00-00”,
“deliverydate”: “2013-04-24”,
“shipTo”: “SIAM PARAGON RETAIL CO.,LTD.”,
“remarks”: “Yet to add remarks in FM”,
“productList”: [
{
“isSelected”: false,
“productCode”: “000000000100009001”,
“productDesc”: “ISMO TAB 20MG 10X10”,
“productSupplier”: “”,
“productPrice”: “300.00”,
“productQty”: “0.000”,
“productCurrency”: “THB”,
“productUom”: “BOX”
},
{
“isSelected”: false,
“productCode”: “000000000100074819”,
“productDesc”: “Paracetamol”,
“productSupplier”: “”,
“productPrice”: “0.00”,
“productQty”: “0.000”,
“productCurrency”: “THB”,
“productUom”: “PC”
}
]
}
var productSource = {
datafields: productListFields,
localdata: localData,
id: ‘productCode’
};
nut grid shows empty rows ..
please help.
Thanks