Hello,
I need a little help please.
How can I get an array with a listGrid records to be sent to PHP?
Thank you.
Hello,
I need a little help please.
How can I get an array with a listGrid records to be sent to PHP?
Thank you.
Hi ecdsystem,
It depends how you want to receive them. One way would be to call DataSource.xmlSerialize() on them.
Hello again
how is whether not use a DataSourse and who received in JSON format?
isc.ListGrid.create({
ID:"listComp",
width:300, cellHeight:24, imageSize:16,
showEdges:true, border:"0px", bodyStyleName:"normal",
alternateRecordStyles:true, showHeader:false, leaveScrollbarGap:false,
fields:[
{name:"img", type:"image", width:24, imgDir:"../img/"},
{name:"areaComp"},
{name:"id", width:20}
]
})
.
.
.
for (i=0;i<=data.length -1;i++){
listComp.data.add({id:myArray[i][‘cod’], areaComp:myArray[i][‘nombre’]});
}
is not like sending the contents of listGrid PHP format JSON
Thank you very much
Could you rephrase?
Sorry for my English!!!
I need to send the contents of a listGrid to PHP in JSON format and do not know how do it.
I do not use DataSource. The listGrid is loaded dynamically (see Definition list and load list)
thanks again
There’s a few free libraries for doing this - this one is popular.
ok,but I need to know how to obtain records of listGrid to send it.
please!!!
thanks
?? You already showed code for accessing the records. In your case it’s just listComp.data, which is an Array of JavaScript Objects representing data. See the SmartClient Reference or a book on JavaScript for more details.