Multiple tables on same page not working....only one does

Multiple tables on same page not working....only one does

victorbobavictorboba Posts: 2Questions: 0Answers: 0
edited March 2009 in General
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?

Replies

  • allanallan Posts: 57,236Questions: 1Answers: 9,113 Site admin
    Hi victorboba,

    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
  • victorbobavictorboba Posts: 2Questions: 0Answers: 0
    This is for ASP.Net MVC. The table is in a control that's rendered using the MVC tag "Html.RenderPartial()"

    <% 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--%>
  • allanallan Posts: 57,236Questions: 1Answers: 9,113 Site admin
    Hi victorboba,

    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
This discussion has been closed.