Binding datatables to ASP:DataGrid and keeping footer separate

Binding datatables to ASP:DataGrid and keeping footer separate

garpajiangarpajian Posts: 3Questions: 0Answers: 0
edited February 2012 in DataTables 1.8
I have an ASP:DataGrid I wish to bind with datatables.net and have the following set up:

var oTable = $('#<%= dgReportResults.ClientID %>').prepend($("").append($('#<%= dgReportResults.ClientID %>').find("tr:first"))).dataTable({
"bPaginate": false,
"bFilter": false,
"bInfo": false,
"bDestroy": true,
"bServerSide": false,
"bProcessing": false,
"bAutoWidth": true,
"bSort": true
});

This worked fine with the header set at top. However, the footer appears to be part of . How do I keep the footer separate from the ? In other words, the footer should appear at the bottom and not be sortable.

Thank you.

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    It might be a daft question, but what footer? I don't see a TFOOT element anywhere in the above script.

    Allan
  • garpajiangarpajian Posts: 3Questions: 0Answers: 0
    Allan,

    Thank you for responding. Sorry I wasn't very clear with the description of the problem. Basically, I need to generate a report that have unknown number of columns and for that reason, I'm using asp:DataGrid with auto generate columns set to true. I also have both header and footer show set so that I can show the header and footer. Here's the DataGrid I have set up:








    I was able to use datatables to show the contents of the DataGrid. The header columns is kept separate from the . However, the footer information appears to be part of element and I'm trying to figure out how to make the footer to be part of element.

    Hope this clarification helps.

    Thank you again.
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    edited February 2012
    I think you are probably best asking on an ASP forum in that case. I'm afraid I know next to nothing about ASP!

    Allan
  • garpajiangarpajian Posts: 3Questions: 0Answers: 0
    Allan,

    Thank you for your help here.
This discussion has been closed.