Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Auto change table row color for dynamic data
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Auto change table row color for dynamic data
#37593
Auto change table row color for dynamic data 11 Years, 9 Months ago Karma: 0
Hi

We would like to use datatable to online schedule time. We have MySQL table data with dynamic auto change by webservice, every time the actual time is changing and for example flight is delayed

for example if schedule time big actual time in datatable row should be in red color.



Is it possible in Datatable? and where we should catch datasource and catch <tr class=delay>

Best Regards
Myrza
The administrator has disabled public write access.
 
#37597
Re:Auto change table row color for dynamic data 11 Years, 9 Months ago Karma: 760
Hello,

The extension can't add extra CSS classes based on specific values.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#37615
Re:Auto change table row color for dynamic data 11 Years, 9 Months ago Karma: 0
Can we use script like
Code:

$(document).ready(function() {
$('#example').dataTable( {
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {

if ( aData[4] == "your criteria" )  // change column number and criteria as needed
{
$(nRow).addClass( 'odd even' );  // optionally remove odd/even classes
$(nRow).addClass( 'yourclass' );
}
return nRow;
}
} );
} );



if we can do this, where we can find the JS call in php ?
The administrator has disabled public write access.
 
#37626
Re:Auto change table row color for dynamic data 11 Years, 9 Months ago Karma: 760
See "initClientInstance" method in <joomla_directory>\modules\mod_aridatatables\includes\kernel\DataTables\Models\class.DataTablesWidgetDatatableModel.php file.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#37667
Re:Auto change table row color for dynamic data 11 Years, 9 Months ago Karma: 0
in Script Declaration the JS call adt_DataTable_DrawCallback function

Code:

if (typeof(AriDataTables) != "undefined") 
    AriDataTables.hideLoadingPane("#at_104_wrapper");
var options = {"bProcessing":true,"iDisplayLength":10,"aaSorting":[]};
options["fnDrawCallback"] = function(oSettings) { adt_DataTable_DrawCallback(oSettings) };
$("#at_104").addClass("display dataTable").dataTable(options);


window.addEvent('load', function() {
new JCaption('img.caption');
});
window.addEvent('domready', function() {
$$('.hasTip').each(function(el) {
var title = el.get('title');
if (title) {
var parts = title.split('::', 2);
el.store('tip:title', parts[0]);
el.store('tip:text', parts[1]);
}
});
var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: false});
});
(window["ADTQuery"] || jQuery)(document).ready(function($) { if (typeof(AriDataTables) != "undefined") AriDataTables.hideLoadingPane("#at_104_wrapper");var options = {"bProcessing":true,"asStripClasses":["odd","even","delay"],"iDisplayLength":10,"aaSorting":[]};options["fnDrawCallback"] = function(oSettings) { adt_DataTable_DrawCallback(oSettings) };$("#at_104").addClass("display dataTable").dataTable(options);});



Where is adt_DataTable_DrawCallback(oSettings), I could not fount the oSettings parameter
The administrator has disabled public write access.
 
#37669
Re:Auto change table row color for dynamic data 11 Years, 9 Months ago Karma: 760
See "initClientInstance" method in <joomla_directory>\modules\mod_aridatatables\includes\kernel\DataTables\Models\class.DataTablesWidgetDatatableModel.php file. Javascript code is generated in the file.

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12