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

mRender never called

$
0
0
Hello,

Above all thanks for your work and sorry for my so bad english I am french.

I am experiencing issue using a mRender function.

I thought it was because of my code by i can't get it works with a really simple code too

Here the source code of my function


$(document).ready(function(){
	$('.data-table').dataTable({
		"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
		"bJQueryUI": true,
		"sPaginationType": "full_numbers",
		"sDom": 'C<r""l>t<"F"fip>',
		"bProcessing": true,
        "sAjaxSource": "/process.php",
        "bScrollInfinite": false,
        "bScrollCollapse": false,
        
        "aoColumnDefs": [
			{
				"mDataProp": "engine",
				"mData": "engine",
				"aTargets": [0],
				"sTitle": "Engine",
				"bSearchable": true,
				"bSortable": true,
				"bVisible": true,
                "mRender": function ( data, type, full ) {
                    alert ("kikoo");
                    return '<a href="'+data+'">Download</a>';
                }
			}, 
			{
				"mDataProp": "version",
				"mData": "version",
				"aTargets": [1],
				"sTitle": "OS Version",
				"bSearchable": true,
				"bSortable": true,
				"bVisible": true,
                "mRender": function ( data, type, full ) {
                    alert ("kikoo");
                    return '<a href="'+data+'">Download</a>';
                }
			}, 
			{
				"mDataProp": "platform",
				"mData": "platform",
				"aTargets": [2],
				"sTitle": "OS Platform",
				"bSearchable": true,
				"bSortable": true,
				"bVisible": true,
                "mRender": function ( data, type, full ) {
                    alert ("kikoo");
                    return '<a href="'+data+'">Download</a>';
                }
			}]

	});


I am building my aoColumnDefs throught a foreach in php.

Here an excerpt og my data source

{"sEcho":1,"aaData":[{"engine":"Trident","browser":"Internet Explorer 4.0","platform":"Win 95+","version":"4","grade":"X"},{"engine":"Trident","browser":"Internet Explorer 5.0","platform":"Win 95+","version":"5","grade":"C"},{"engine":"Trident","browser":"Internet Explorer 5.5","platform":"Win 95+","version":"5.5","grade":"A"}]}


The 'Kikoo' alert never come.

Thanks in advance for your answer.

Viewing all articles
Browse latest Browse all 82109

Trending Articles



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