Sort columns re-appearing

Sort columns re-appearing

peter.rogerspeter.rogers Posts: 1Questions: 0Answers: 0
edited May 2011 in General
Hi,

I am building a table using the code below, there are a couple of issues:

1. the columns that I have defined as not sortable works initially but when I click on the sort for one of the other columns these columns also become sotable.

2. The processing message never shows even though it can take a couple of seconds to load
3. The width of the table (this seems to be an IE 8 issue) the only way I can get the width to be correct is to set it manually (see SetWidth below), and then when I click on a sort the width shrinks to about half the size. This only happens in IE 8 (works fine in Firefox and other version of IE)

function PopulateSummaryRepeater() {

$('#tblSummary').dataTable().fnClearTable();

var getLatest = (document.getElementById("selSumShow")).options[document.getElementById("selSumShow").selectedIndex].value;


var CompId = $('select.drpSumCompList option:selected').val();



$.ajax({
type: "POST",
url: "ePortfolio.aspx/SetupSummary",
contentType: "application/json; charset=utf-8",
data: "{'getLatest' : " + getLatest + ", 'competencyId' : " + CompId + "}",
dataType: "json",
success: function (msg) {

$('#tblSummary').dataTable().fnDestroy();

BuildSummaryTable(msg);

$('#tblSummary').dataTable({
"bProcessing": true, "iDisplayLength": 100, "bAutoWidth": false, "fnDrawCallback": function () { ResetWidth(); },
"aoColumns": [

{ "bVisible": false },
{ "bSortable": false },
null,
{ "bVisible": false },
null,
null,
null,
null,
{ "bSortable": false },
{ "bSortable": false }
]
});
},
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status + " - " + xhr.statusText);
//alert(xhr.responseText);
}
});
}

function BuildSummaryTable(msg) {

$('#SummaryTableContainer').setTemplateURL('/UserControls/summaryTable_3.htm');
$('#SummaryTableContainer').processTemplate(msg);

}

function ResetWidth() {

$("#tblSummary").css("width", "100%")
}


PS

This is an excellent product and I will be making a donation to show my appreciation
This discussion has been closed.