Open GoogleCodeExporter opened 8 years ago
Adding to that, I have a preProcess method. Here is the specification for the
same.
preProcess : function (json) {
var results = new Array();
jQuery.each(json.object, function() {
var row = {};
var cell = new Array();
jQuery.each(this, function(k, v) {
if (k == "requestUrl" && v == "") {
cell.push("NA");
} else {
cell[k] = v;
cell.push(this);
}
});
row["cell"] = cell;
results.push(row);
});
return {
rows : results,
page : json.pageCount,
total : json.total
};
}
Original comment by just...@gmail.com
on 18 Mar 2012 at 5:51
I was able to resolve the issue. The condition check at Line #357 seemed to be
wrong for my case.
Here is what I changed to make it use the colModel instead of index based
population of cell. This section of code is in addData method.
$('thead tr:first th', g.hDiv).each( //add cell
function () {
var td = document.createElement('td');
var idx = $(this).attr('axis').substr(3);
td.align = this.align;
// If the json elements aren't named (which is typical), use numeric order
if (typeof row.cell[idx] == "undefined") {
td.innerHTML = (row.cell[idx] != null) ? row.cell[idx] : '';//null-check for Opera-browser
} else {
td.innerHTML = row.cell[p.colModel[idx].name];
}
$(td).attr('abbr', $(this).attr('abbr'));
$(tr).append(td);
td = null;
}
);
Original comment by just...@gmail.com
on 18 Mar 2012 at 5:54
I too have the same problem . I want to display the JSON datas returned using
'names' because i don't to display every fields displayed in the JSON.
Original comment by stylishr...@gmail.com
on 28 Mar 2012 at 10:47
I would be grateful if you show the format of JSON data returned in comment2
because i am having the same problem. Hope ! solution works for me because i
have been stuck because of this problem.
Thanks in advance
Original comment by stylishr...@gmail.com
on 28 Mar 2012 at 10:50
I have already provided the solution which is working for my case above. See if
that works for you too.
Original comment by just...@gmail.com
on 28 Mar 2012 at 10:50
The JSON format is given in Comment #1 and the Column Model used is available
in Comment #2.
Original comment by just...@gmail.com
on 28 Mar 2012 at 10:53
{
display: 'Bank IFSC Code',
name : 'bankIFSCCode',
width : 100,
sortable : true,
align: 'left'
},
Check this code again, If you want easy API solutions for IFSC code web
application
try http://www.bankswiftifsccode.com
Original comment by howtorea...@gmail.com
on 31 Oct 2013 at 1:07
Original issue reported on code.google.com by
just...@gmail.com
on 18 Mar 2012 at 5:20