Multiple tables on same page not working....only one does
Multiple tables on same page not working....only one does
victorboba
Posts: 2Questions: 0Answers: 0
I've got a page with multiple tables and only the first one is working with the dataTables sorting. I've connected the table to DataTables using the class name of the table.
Any ideas?
Any ideas?
This discussion has been closed.
Replies
Can you post an example page showing the error that you are seeing? My multiple tables examples page appears to be working fine: http://datatables.net/examples/example_multiple_tables.html
Thanks
Allan
<% Html.RenderPartial("WorkQueueControl", personalQueue); %>
Here's the code for the control and I'm defining the following tag in jQuery
$(".vertable").dataTable();
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<!-- ----====Personal Queue====---- -->
Personal Queue
Filter:
<!-- Clicking the column labels should sort the table -->
Envelope
Number
<!-- The Envelope number will be the link to go work on the filing -->
Filing
Type
Name
Received
Associated
Items
Priority
<% foreach (Ccis.Cgov360.Services.Data.DataContracts.WorkQueueItem item in Model.WorkQueueItemCollection)
{ %>
<%= Html.QueueEnvelopeLink("personal", 20) %>
<%= item.DocumentType %>
<%= item.Name %>
<%= item.Received.ToString("MM/dd/yyyy hh:mm tt") %>
<%= item.AssociatedItem.DisplayName() %>
<%= item.Priority ? "!":"" %>
<%} %>
<%-- Next 10 » « Previous 10--%>
I might be losing it (I've never used ASP.Net so I might be missing something as well), but isn't there only one table with the class "vertable" in the HTML you posted? Indeed, isn't there only one table? I see the foreach to add the data to the table, but nothing that would have multiple tables on the page.
Allan