Problem with thead align

Problem with thead align

ma7hma7h Posts: 1Questions: 0Answers: 0
edited February 2012 in DataTables 1.9
Hi!
I'm working with DataTables 1.9 and Asp.net gridview framework 4.0, and I'm having some problems in thead align and when my gridview is empty.
First problem: In this image you can see what happens when I use gridview with datatables in a asp modalpopup: http://ogbrasil.com/clientes/cdhu/problem01.jpg and the generated code is: http://ogbrasil.com/clientes/cdhu/example01.html . The most interesting thing is that when I click on table header, the table aligns.
Second problem: When I have some blank gridview the datatable tell me that the "asSorting is null or not an object".

Here's my initialization code for this problematic grid is:
[code]
function pageLoad() {
$('#<%= GVPessoaCdhu.ClientID %>').dataTable({
"bJQueryUI": true,
"iDisplayStart": 0,
"bPaginate": false,
"bLengthChange": false,
"bFilter": true,
"bSort": true,
//"aoColumnDefs": [
// { "bSortable": false, "aTargets": [7, 8, 9, 10] }
//],
"bAutoWidth": true,
"sScrollY": 200,
"sScrollX": "100%",
"sScrollXInner": "100%"
});
}
[/code]

To can do an alternative to this alignment problem I did this:
[code]
$('#<%= GVPessoaCdhu.ClientID %>').dataTable({
"iDisplayStart": 0,
"bJQueryUI": true,
"iDisplayStart": 20,
"bPaginate": true,
"bLengthChange": true,
"bFilter": false,
"bSort": true,
"sScrollXInner": "100%"
});
[/code]

But by this way I lost the scrollbar function.

Thanks for all!
This discussion has been closed.