Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82057

Hello,

$
0
0

@using Resources;

<style>

table.dataTable td:nth-child(7) {
    width: 430px;
    max-width: 430px;
    word-break: break-all;
    white-space: nowrap;
}

</style>

ID @Resource.Name
$(document).ready(function () { var myIP = '@ViewBag.IP'; var table = $("#@ViewBag.DivId").DataTable({ "ajax": { "url": "/api/list/Person?op=" + '@ViewBag.Qs["op"]', "dataSrc": "" }, dom: '<"toolbar">' + '<"top">frt<"bottom"lpi><"clear">', "rowId": "ID", "columns": [ { "data": "ID" }, { "data": "Name" }, { "data": null, "className": "center", "defaultContent": '@Resource.Show' } ], "columnDefs": [ { "targets": [0], "visible": false, "searchable": false } ] }); $('#@ViewBag.DivId').on('click', 'tr', function (evt) { var $cell = $(evt.target).closest('td'); if ($cell.index() == 7) { return; } var rowData = table.row(this).data(); if (rowData && rowData.ID) { var url = "/Detaail/Person/" + rowData.ID; window.location.href = url; } }); Refresh = function () { table.ajax.reload(); } });

Viewing all articles
Browse latest Browse all 82057

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>