ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: omerix on November 24, 2013, 03:26:08 am
-
Hello,
I want to use the render function, Coll value=undefined
var colM = [
{ title: "#",render: function (ui) {
var rowData = ui.rowData;
return ""+rowData[2]+"";
//return "<a Onclick=\"Popup('Ceki_Fason_Giris.asp?cekino="+rowData[1]+"')\"><img src='img/i16/0.png'/>"+rowData[2]+"</a>";
}},
{ title: "ID", dataIndx: "ID", width: 100 },
{ title: "Ceki No", width: 180, dataIndx: "CEKINO" },
{ title: "Order No", width: 140, dataIndx: "ORDERNO" },
{ title: "Model", width: 140, dataIndx: "MODEL", editor: { type: 'select', options: ['US', "India", "China"]} },
{ title: "Musteri", width: "170", dataIndx: "MUSTERI", editor: { type: 'textarea', attr: "rows=3 cols=40"} },
{ title: "Tarih", width: "170", dataIndx: "TARIH", editor: { type: 'textarea', attr: "rows=3 cols=40"} },
{ title: "Sevk Tarihi", width: "170", dataIndx: "STARIH", editor: { type: 'textarea', attr: "rows=3 cols=40"} }
,{ title: "B1", width: 10, dataIndx: "B1",hidden:true}
];
-
In the first column your dataIndx is an integer inside the render function while in rest of the columns you are using dataIndx as strings.
You have to be consistent, all dataIndx should be either strings or integers and your data should be JSON in first case while array of arrays in 2nd case.
So instead of 2 in rowData[2] you have to put name of field in [] i.e. rowData["ID"] or rowData["CEKINO"]
-
Thank you param :D