TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mohan Srinivas
NA
147
52.5k
table displaying [object Object] in every cell
May 19 2017 6:50 AM
based on drop down i m displaying table using ajax jquery call.while i m selecting drop down list table is displaying but every cells showing [object Object] instead of data's
This my jquery code:
function generateTable(json) {
var $table = $('#tblDynamic');
$table.find('thead').empty()
$table.find('tbody').empty()
if (json && json.length > 0) {
var header = json[0];
var columns = [];
for (var col in header) {
columns.push('<th>' + col + '</th>');
}
$table.find('thead').append('<tr>' + columns.join('') + '</tr>');
var rows = [];
for (var i = 0; i < json.length; i++) {
var row = json[i];
var tds = [];
for (var col in row) {
tds.push('<td>' + row + '</td>');
}
rows.push('<tr>' + tds.join() + '</tr>');
}
$table.find('tbody').append(rows.join(''));
}
}
Reply
Answers (
7
)
Count & display dynamic length string on Datagridview
inserting special character in access database