I create table dynamically:
function createResultsTable(data) {
var table = $('<table id="tblResultsList">');
var tr;
var td;
$.each(data.d.foundItems, function(i, item) {
var button = $('<button/>', {
text: item.code,
click: function () { CellClicked(item.x,item.y,"") }
});
i % 3 === 0 && (tr = $('<tr>').appendTo(table));
tr.append('<td>').prepend(button).end();
});
$('#rstSearch').append(table);
}
Here how it looks in the view now:
Here is the Fiddle.
Here is the desired look of the content:
Here is the Fiddle.
But I am stuck. I don't know how to move to the center content and make it quadratic.