Hello all,
I wanted to color rows that met certain conditions, by following the example in
docs.dhtmlx.com/doku.php?id=dhtm … re_loading
I tried and failed, so I tried something very simple. I changed the code to color every row red of a simple grid as follows:
<?php require_once("./toitoi_config.php"); require_once("./dhtmlx/connector/codebase/grid_connector.php"); $res=mysql_connect($mysql_server,$mysql_user,$mysql_pass); mysql_select_db($mysql_db); function color_rows($row){ $row->set_row_color("red"); } $grid = new GridConnector($res); $grid->dynamic_loading(100); $grid->event->attach("beforeRender","color_rows"); $grid->render_table("clienti","CODICE","COGNOME_NOME,RAG_SOCIALE2,INDIRIZZO,CITTA_RES,CAP,PV,CONTATTO"); ?>What happens is that the rows get colored alternatively (i.e. one red, one white, one red, etc)