Zero configuration defaults not working

Zero configuration defaults not working

jpmcfeelyjpmcfeely Posts: 1Questions: 1Answers: 0
edited June 2018 in Free community support

I have tried to follow the examples on the page but I have not yet been able to get these working correctly as my table is not having the styles applied to it nor are there any of the default paging and ordering functionality included not sure where I am going wrong. Here is my code:

<script type="text/javascript" src="~/Scripts/jquery-3.3.1.js"></script>
<link type="text/css" href="https://cdn.datatables.net/1.10.19/css/dataTables.bootstrap.min.css" rel="stylesheet" />
<link type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet" />
<link type="text/css" href="https://cdn.datatables.net/responsive/2.1.1/css/responsive.bootstrap.min.css" rel="stylesheet" />

<script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.10.19/js/dataTables.bootstrap4.min.js"></script>

<script>
    $(document).ready(function () {
        $('#example').DataTable();
    });
</script>

<h2>Settlement Reports</h2>

<table id="example" class="table table-striped table-bordered table-responsive text-nowrap" style="width:100%">
    <thead>
        <tr>
            <th>Report Type</th>
            <th>Participant Name</th>
            <th>Market Name</th>
            <th>Settlement Date</th>
            <th>Publication Date</th>
            <th>Publication Timestamp</th>
            <th>Run Type</th>
            <th>Statement ID</th>
            <th>Registered Currency</th>
            <th>Actions</th>
        </tr>
    </thead>

    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>@item.REPORT_TYPE</td>
                <td>@item.PARTICIPANT_NAME</td>
                <td>@item.MARKET_NAME</td>
                <td>@item.SETTLEMENT_DATE.ToString("dd/MM/yyyy")</td>
                <td>@item.PUBLICATION_DATE.ToString("dd/MM/yyyy")</td>
                <td>@item.PUBLICATION_TIMESTAMP.ToString("dd/MM/yyyy HH:mm:ss")</td>
                <td>@item.RUN_TYPE</td>
                <td>@item.STATEMENT_IDENTIFIER</td>
                <td>@item.REGISTERED_CURRENCY</td>
                <td>
                    @Html.ActionLink("Details", "Details", new { id = item.STTL_REPORT_ID }) |
                    @Html.ActionLink("Export to Excel", "Export", new { id = item.STTL_REPORT_ID })
                </td>
            </tr>
        }
    </tbody>

</table>

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @jpmcfeely ,

    At a glance that looks OK. We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.