How to use first row's third cell's value as title of the column
How to use first row's third cell's value as title of the column

I have a datasrc that looks like this
"dataSrc": function (json) {
var return_data = new Array();
for(var i=0;i< json.length; i++){
return_data.push({
'itemCode': json[i].itemCode,
'iMG' : '<img src=\"' + json[i].iMG + '\">',
'category' : json[i].category,
'sEARCHBOX' : json[i].sEARCHBOX,
'pickupandCash': json[i].pickupandCash,
'rEGPRC': json[i].rEGPRC,
'vLBC': json[i].vLBC,
'warranty': json[i].warranty,
'pROMO1': json[i].pROMO1,
'pROMO2': json[i].pROMO2,
'cODE': json[i].cODE,
'time': json[i].time,
})
}
the time column in my datasrc only has value on the first row. it is null the rest of the way.
Can I use this particular first row's third cell's value as the title of the column? And how?
Thanks!
Edited by Sandy - Formatting. Details on how to format text using markdown can be found in this guide.
This discussion has been closed.
Replies
Hi @jaceleon ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin