Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all 81690 articles
Browse latest View live

DataTables Responsive Recalc Reinitializes Table

$
0
0

I have a simple table in a modal window. When the table is initialized, I recalculate the column width so the table fits properly after it's done loading. However, the api call table.DataTable().responsive.recalc(); is reinitializing the DataTable and throwing an error. More specifically, in the call stack, table.DataTable() is the culprit, taking me from
// For each initialisation we want to give it a clean initialisation
all the way to
function _fnCreateTr ( oSettings, iRow, nTrIn, anTds ) before it gives me the error: DataTables warning: table id="id" - Requested unknown parameter '1' for row 0, column 1. For more information about this error, please see http://datatables.net/tn/4

This only happens when i resize the window and after I have closed the modal and reopened it. The first time the table is open it works fine, resizing and all. Is there something I am missing? The table isn't left in the dom when the modal is closed, the modal and it's contents are removed each time.


Clear search while reloading site

$
0
0

How do I have the search field cleaned when I reload the site? Why does it already open filtering if I give a reload?

Retrieve row data from a clicked row

$
0
0

Hello all!

I am new to the forums and to DataTables and so far this control looks AMAZING! I am doing a test for my manager today and have several items working correctly. I create my var of the Datatable, throw on a few buttons, etc. get JSON data from the server and populate the table. The one part I cannot seem to get working is simply retrieving the row data from a DataTable grid?

I am going to use the row data to then send back to my server for processing. I have looked at several examples and it is simply beyond me. Does anyone have a very, VERY simple example of capturing the row data on a clicked row via JQuery?

Thank you all!!!
Jason

Toggle button not work on page 2 and so on. How can I fix it.

$
0
0


See the image of first page. The toggle button work on 1st page.

Toggle button not properly working on page 2.

Opening child row for all selected rows.

$
0
0

I need a button which will open child rows for all selected rows.
Assuming this is a valid way to obtain the selected rows:

var selectedRows = oTable.rows({ selected: true }).row();

how can I apply row.child.show() to each item in selectedRows?
Or am I missing a better way?

Comma-formatting in decimals in the editor

$
0
0

I'm trying to implement decimal number formatting by using the comma instead of the dot. The error occurs when the Editor is going to save the data.
In PHP file i have this instance

Field::inst( 'rawProducts.olii' )->validator( 'Validate::numeric')->getFormatter( 'Format::toDecimalChar' )->setFormatter( 'Format::fromDecimalChar')->setFormatter( 'Format::ifEmpty', 0 ),

The data is rendered correctly with the comma, but when I click the save button I return the following error
This input must be given as a number.

Specifically, in the Mysql table the field is defined as float (6.2)

I've tried several options like entering the comma option in validation, replacing the setFormatter method with this function

->setFormatter( function($val, $data, $field) {return str_replace ( ',' , '.' , $val );})

I would also need to include a validation of minimum / maximum value but with this the problems multiply .

I have tried for many hours to come up with this issue but without results, no suggestions. Thanks in advance

Print DataTable with many columns or big data

$
0
0

I know this has been asked before, probably it's still not possible to make the table responsive to printing/PDF exporting.

But is there a way I can make the columns go to a new page when they don't fit?

My situation: http://prntscr.com/hp2csi

PS: It will not only happen with many columns, but also when I have big values on columns.

Touch gesture compatibility in Datatables?

$
0
0

Would it be possible to implement a feature where swiping to the left or right would change the page to previous or next respectively? This would be a pretty useful responsive functionality to have on mobile devices


Hi i'm getting the following error in my console.In the output page the buttons are not displaying

$
0
0

ERROR:
Uncaught TypeError: Cannot read property 'mData' of undefined
at HTMLTableCellElement.<anonymous> (jquery.dataTables.min.js:89)
at Function.each (jquery-1.12.4.js:370)
at jQuery.fn.init.each (jquery-1.12.4.js:137)
at HTMLTableElement.<anonymous> (jquery.dataTables.min.js:89)
at Function.each (jquery-1.12.4.js:370)
at jQuery.fn.init.each (jquery-1.12.4.js:137)
at jQuery.fn.init.m [as dataTable] (jquery.dataTables.min.js:82)
at jQuery.fn.init.h.fn.DataTable (jquery.dataTables.min.js:164)
at localhost/:55

HTML:
<title>DataTable</title>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.5.1/css/buttons.dataTables.min.css">
</head>

<body>
<table id="example">
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
<tr>
<td>Ernst Handel</td>
<td>Roland Mendel</td>
<td>Austria</td>
</tr>
<tr>
<td>Island Trading</td>
<td>Helen Bennett</td>
<td>UK</td>
</tr>
<tr>
<td>Laughing Bacchus Winecellars</td>
<td>Yoshi Tannamuri</td>
<td>Canada</td>
</tr>
<tr>
<td>Magazzini Alimentari Riuniti</td>
<td>Giovanni Rovelli</td>
<td>Italy</td>
</tr>
</table>

SRICPT:





$('#example').DataTable( { dom: 'Bfrtip', buttons: [ 'copy','Excel' ] });

bootstrap form-control for select tags

$
0
0

Hello there,

I want to add a basically vanilla select field to my editor (most recent version). I also use bootstrap 4.

All the other tags seems to get an automatic "form-control"-class added to them, only select doesn't. I could not find any "natural" way to add the class to every select.

Is that an oversight by me, or is there something wrong with how Editor works with the new bootstrap?

Thank you very much for any help.

Cheers
Rüdiger

how to set a different timeout?

$
0
0

Hi,

i need to change the timeout wait for a page, now is set on 30 second but i need more time to elaborate the records.

Thanks

confirmation on form close

$
0
0

Referencing https://datatables.net/forums/discussion/32883, I tried this implementation. I see (at least on Chrome) that if I use ESC, the popup is displayed twice, but Cancel does indeed bring user back to form to continue editing. If I close the form using the X in the upper right, however, the form closes whether I click OK or Cancel.

Is there something I'm doing wrong? I can set up test area for you again if needed.

In case there is some conflict specific to my processing, my full event handler setup is

// this must be done after datatables() is called in datatables.js
var openVals;
function afterdatatables(){
    editor.on( 'uploadXhrSuccess', function ( e, fieldName, json ) {
        console.log ('elev = ' + json.elev + ' distance = ' + json.distance);
        editor.field('elev').set(json.elev);
        editor.field('distance').set(json.distance);
        editor.field('active').set(json.active);
        editor.field('location').set(json.location);
    } );

    editor.on('initCreate', function() {
        editor.set('active', 1)
        editor.field('active').hide()
    });

    editor.on('initEdit', function() {
        var fileid = editor.get('fileid');
        editor.set('turns', 'Loading...')
        editor.field('active').show()
        $.ajax({
            // rr_turns_url_prefix comes from runningroute-*-config.js
            url: rr_turns_url_prefix + '/admin/' + fileid + '/turns',
            success : function(data) {
                editor.set('turns', data.turns)
            },
            error : function(jqXHR, textStatus, errorThrown) {
                editor.set('turns', 'ERROR: could not retrieve turn data\n'
                            + '   ' + errorThrown)
            },
        });

    });

    // confirm before closing window for unsaved changes
    // from https://datatables.net/forums/discussion/32883
    editor
        .on( 'open', function () {
            // Store the values of the fields on open
            openVals = JSON.stringify( editor.get() );
        } )
       .on( 'preClose', function ( e ) {
            // On close, check if the values have changed and ask for closing confirmation if they have
            if ( openVals !== JSON.stringify( editor.get() ) ) {
                return confirm( 'You have unsaved changes. Are you sure you want to exit?' );
            }
        } )
       .on( 'preBlur', function ( e ) {
            // On close, check if the values have changed and ask for closing confirmation if they have
            if ( openVals !== JSON.stringify( editor.get() ) ) {
                return confirm( 'You have unsaved changes. Are you sure you want to exit?' );
            }
    } );
};

Exporting url to excel

$
0
0

Hello, I’m tried to find a fix in google but nothing result. I sea that a lot of people had this issue too.

The problem is that I have in my table a row with a link like ‘<a href=‘link’>some<a>’ but when I export using default buttons to excel, the file doesn’t show an hyperlink, just a plaintext

Multiple DataTable Export in to Multiple worksheet

$
0
0

How to export multiple datatables in to multiple worksheets in single Excel workbook on single click using Datatable export buttons. Please help me.

Upload many combined with child table

$
0
0

Hello everyone,

I tried to combine the upload many example (https://editor.datatables.net/examples/advanced/upload-many.html) with child table example (https://datatables.net/blog/2016-03-25) to upload files only for the child entries, but I always get the error message "A server error occurred while uploading the file".

I guess the error occurs due the php server script.

I set up an extra SQL-Table like this (with one manually created entry):

CREATE TABLE `files` (
  `id` int(8) NOT NULL auto_increment,
  `user_id` varchar(128) NOT NULL,
  `file_id` varchar(128) NOT NULL,
  `filename` varchar(128) NOT NULL,
  `filesize` varchar(128) NOT NULL,
  `web_path` varchar(256) NOT NULL,
  `system_path` varchar(256) NOT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

INSERT INTO `files` (`id`, `user_id`, `file_id`, `filename`, `filesize`, `web_path`, `system_path`) VALUES
(1, '58', '1', 'tset.pdf', '4232424', 'http://127.0.0.1/upload/', '/upload/');

Do I need a second "users_files" table? I don't understand this part in the upload example:

   Mjoin::inst( 'files' )
        ->link( 'users.id', 'users_files.user_id' )
        ->link( 'files.id', 'users_files.file_id' )

Can anyone explain this part to me?

I already changed a lot, so it would be hard to review my whole code, but if anyone interested in it than I can publish it.

Thanks in advance

pib


Sorting icon sorts the column to the left of it

$
0
0

Everything in my dataTables works fine. It's a server side solution based on a joined PHP call, all data are presented in the right columns with the right headings, but when I click the sorting icon, it sorts the data in the column to the left. It's as though the sorting icons are one column wrong, everything else works fine. Clicking on the first columns icon for sorting gives this message: "DataTables warning: table id=user_data - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1".
To me it seams that columnindex is out of order, but I don't know how to fix it.
'''
var dataTable = $('#user_data').DataTable({
"processing":true,
"serverSide":true,
"order":[[2, 'asc']],
"ajax":{
url:"fetch.php",
type:"POST",
},
"columnDefs":[
{
"targets":[ 4, 5],
"orderable":false,
},
],
})
'''
I have set it to order a column (here nr. 2) which is the second column, that ought to have nr. 1? But if this is column 2, then the targets later should be 5, 6, but must be 4 and 5 to hit the right columns! Any suggestions?

Jquery datatable is nnot showing paging

$
0
0

i m unable to get pagination using this plugin here is my code

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>

<!--Import jQuery before export.js-->



<!--Data Table-->
<link href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css" rel="stylesheet" />




<!--Export table buttons-->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.24/build/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/bpampuch/pdfmake/0.1.24/build/vfs_fonts.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.2.4/js/buttons.html5.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/1.2.1/js/buttons.print.min.js"></script>

<!--Export table button CSS-->

<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel=" stylesheet" href="https://cdn.datatables.net/buttons/1.2.4/css/buttons.dataTables.min.css">


@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")

</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink("Application name", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
@Html.Partial("_LoginPartial")
</div>
</div>
</div>
<div class="container body-content">
@RenderBody()
<hr />
<footer>
<p>© @DateTime.Now.Year - My ASP.NET Application</p>
</footer>
</div>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
</body>
</html>

columnDefs render function text input value when filtered

$
0
0

I have a datatable that uses the render property for a column def. This renders a text input with a unique id. how do i get that text inputs value after it has been filtered out of the datatable?

cheap copper evaporation materials

$
0
0

Our History
Henan Guoxi Ultra-pure New Materials Co., Ltd was established in June of 2012 by several experts who are studying Material Science Major from School of Material Science and Engineering (SMCE) at Central South University, which covers an area of 110,000 square meters, its registered capital is 12,000,000.00usd.
The industrialization project of our ultra-pure metal materials is located in the chain front of advanced manufacturing and high-tech industry.We research and develop independently new generation of 5N and 6N (purity ≥ 99.9999%) ultra-pure zinc, copper and other ultra-high purity metal materials technology in scale production,our products have been applied to the field of advanced manufacturing,military sector, semiconductor,and so on.
Our Factory
Henan Guoxi Ultra-pure New Materials Co., Ltd. is a high-tech enterprises which is committed to researech and develop high-quality super pure metal materials in large-scale production.
Guoxi has established an innovative and complete producing, researching and selling system, which is oriented by the marketing development, based on the research resource of university and guided by the direction of industry. Our main products cover most of metal thin film materials such as metal sputtering targets, metal alloy sputtering targets, arc cathodes, high purity evaporation materials and backing plates, together with metal crucible liners. Now, our products have already been exported to Korea, Japan, America, Europe and Middle East, and it’s good quality, competitive price, timely delivery and best after-sales service are highly appreciated by our customers.
Our Product:
Guoxi Products includes the following:
1, High purity copper
2, High purity Zinc
3, High purity aluminum
4, Alumina ceramic powder
As a high technology company integrating production, teaching and research, Guoxi Ultra-Pure is engaged in producing and selling the most suitable and high quality 6N(purity≥99.9999%)zinc,copper,nickel,and other ultra-pure metal material.
Product Application
High-pure cathode copper is used in plasma deposition (sputtering) processes, including the manufacture of semiconductors and superconductor components, as well as in high vacuum devices such as particle accelerators. In any of these applications, the release of oxygen (and/or other impurities) can cause undesirable chemical reactions with other materials in the local environment.
--Welding Torch Tips
--Switch Gears
--Bolts
--Studs
--Soldering Copper
--Relay Parts
--Electrical Switches on Power
--Semiconductors
--Fasteners
--Transformers
--Circuit Breaker Terminals
--Electrical Connectors
--Transistor Bases
--Gas Cutting Nozzles
--Motor Parts
--Switch Parts
--Soldering Tips
--Furnace Brazed Parts
--Screw Machine Products
--Forgings
--Plumbing Fittings
--Sprinkler Heads
--Fixtures
--electronic chemical materials
--special alloy material
--Polyurethane scooter wheels and skate wheels, which from our second production line, are widely used for children playing scooters and skate shoes.
Our Certificate
Our Company have manufactured the batch productionof 6N high purity copper and zinc at present , now our products have been applied in high-class manufacturing fields and national defense department and get good Economic benefit and social benefit.< Henan Guoxi Ultrapure New Materials Project Technology Research Center> was built under every government department support,we will improve mechanism of innovation better and better.We achieved two scientific research international advanced achievements: 《Large-scale producing 6N high purity zinc project technology》and《Large-scale producing 6N high purity copper project technology》, eight utility model of patents and two invention patents in 2015.Our company have the honor to be selected to 《military industrial products recommended catalog》,we also actively promote civil-military integration depth.
Our company own province-class ultra purity metal research centre,we get core technology of more than ten independent intellectual property rights and self-management import and export rights by researching and developing ourselves.We pass SGS and ISO quality system certificate ,also biography 《Recommended Tissue List of Military Products》.
Production Market
Now our 99.9999% high purity copper has been exported to America and Russia,6N copper pellets is sold to Canada and Korea,high purity copper ingot is now also in Japan market for bonding wires.
We are striving to seeking for higher overseas market ,also want to expand our market to other country.
Our service
1.before sales,we are strict to adhere ISO quality management system;
2.in sales,we check every batch of products for better packages;
3.after sales,we have professional steam tto serve for you everyday.cheap copper evaporation materials
website:http://www.6nmetal.com/
website2:http://www.6ncu.com/

wholesale Titanium cladded Copper pipes

$
0
0

SB265 Titanium clad copper round pipes/tubes with material Gr1 or Gr2 and copper T2 or TU2
Clad material: Ti acc. to No. 37025 or 37025 or 3.7055,, ASTM B 265 Grade 1
Core material: Cu acc. to TU2, E-Cu58, CU-ETP, CW004A, UNS No.C 11000
acc. to T2, SE-Cu, CU-HCP, CW021A, UNS No.C 10300
Dimensions:
Form Dimension in mm Dimension in inch
Round OD10-OD100 0.4”-4”wholesale Titanium cladded Copper pipes
website:http://www.aatiticladcu.com/anodes-and-cathods/titanium-clad-copper-tubes/

Viewing all 81690 articles
Browse latest View live


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