Binding datatables to ASP:DataGrid and keeping footer separate
Binding datatables to ASP:DataGrid and keeping footer separate
garpajian
Posts: 3Questions: 0Answers: 0
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.
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.
This discussion has been closed.
Replies
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.
Allan
Thank you for your help here.