Separate datatable for each row in db..Net
2 answers
Uses jquery. If you have multiple tables, you will need to modify them to accommodate this. It is also just added to the end of the document. If you want to find it elsewhere, find the element you want to place after it and insert it into the DOM at that point.
$(document).ready(
function() {
var headers = $('tr:first').children();
$('tr:not(:first)').each(
function(i,row) {
var cols = jQuery(row).children();
var dl = jQuery('<dl></dl>');
for (var i=0, len = headers.length; i < len; ++i) {
var dt = jQuery('<dt>');
dt.text( jQuery(headers[i]).text() );
var dd = jQuery('<dd>');
dd.text( jQuery(cols[i]).text() );
dl.append(dt).append(dd);
}
$('body').append(dl);
}
);
$('table').remove();
}
);
+2
source to share
Here's the link:
http://www.mail-archive.com/ flexcoders@yahoogroups.com /msg15534.html
The google terms I think you need is "invert datagrid". You will get a lot of hits.
0
source to share