<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[Jquery] DataTables e funzione di Callback]]></title><description><![CDATA[<p dir="auto">Salve a tutti,<br />
sto utilizzando il tool <a href="http://datatables.net/" rel="nofollow ugc">DataTables</a>, in particolare la funzione di <a href="http://datatables.net/release-datatables/examples/advanced_init/row_callback.html" rel="nofollow ugc">fnRowCallBack</a>.</p>
<p dir="auto">Funzionata tutto correttamente, ma prendendo in esame l'esempio presente:</p>
<pre><code>"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
            /* Append the grade to the default row class name */
            if ( aData[4] == "A" )
            {
                $('td:eq(4)', nRow).html( '&lt;b&gt;A&lt;/b&gt;' );
            }
        },
</code></pre>
<p dir="auto">se volessi allegare un'altra <strong>function</strong> di Callback come posso fare?</p>
<p dir="auto">Non riesco a venirne a capo.</p>
<p dir="auto">Grazie.</p>
]]></description><link>https://dev.connect.gt/topic/199704/jquery-datatables-e-funzione-di-callback</link><generator>RSS for Node</generator><lastBuildDate>Fri, 27 Nov 2026 12:16:52 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/199704.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 28 Feb 2014 11:49:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Jquery] DataTables e funzione di Callback on Fri, 28 Feb 2014 14:20:22 GMT]]></title><description><![CDATA[<p dir="auto">Usato la funziona sbagliata (come segnalato da un utente di un altro forum!)<br />
La fnRowCallback viene richiamata per ogni singola riga, mentre la fnDrawCallback viene richiamata a render ultimato.<br />
Quindi all'interno di questa ho potuto applicare la mia funzione, cioè:</p>
<pre><code>[/FONT]
[FONT=Arial]"fnDrawCallback": function (oSettings) {[/FONT]
[FONT=Arial]          var customHeightTable = $(window).height() - ([/FONT]
[FONT=Arial]                    $("header").outerHeight(true) +[/FONT]
[FONT=Arial][/FONT][FONT=Arial]                    [/FONT][FONT=Arial]$("#pageTitle").outerHeight(true) +[/FONT]
[FONT=Arial][/FONT][FONT=Arial]                    [/FONT][FONT=Arial]$(".report-filter").outerHeight(true) +[/FONT]
[FONT=Arial][/FONT][FONT=Arial]                    [/FONT][FONT=Arial]$("#alignmentTable_filter").outerHeight(true) +[/FONT]
[FONT=Arial][/FONT][FONT=Arial]                    [/FONT][FONT=Arial]$(".dataTables_scrollHead").outerHeight(true) +[/FONT]
[FONT=Arial][/FONT][FONT=Arial]                    [/FONT][FONT=Arial]$("#alignmentTable_info").outerHeight(true) +[/FONT]
[FONT=Arial][/FONT][FONT=Arial]                    [/FONT][FONT=Arial]$("#legend").outerHeight(true));[/FONT]
[FONT=Arial]                $(".dataTables_scrollBody").css("height", customHeightTable);[/FONT]
[FONT=Arial]
</code></pre>
<p dir="auto">e quindi permettere di avere un'altezza della tabella tale da riempirmi tutta la finestra del mio browser senza ulteriori scroll associati alla finestra stessa.</p>
<p dir="auto">Un'ultimo consiglio: siccome vorrei cercare di centralizzare questa funzione e poterla applicare anche ad altre pagine, come posso verificare se un DIV è presente in una pagina così da non generare un errore JS?</p>
<p dir="auto">Grazie.</p>
]]></description><link>https://dev.connect.gt/post/1154763</link><guid isPermaLink="true">https://dev.connect.gt/post/1154763</guid><dc:creator><![CDATA[felino]]></dc:creator><pubDate>Fri, 28 Feb 2014 14:20:22 GMT</pubDate></item></channel></rss>