RE: Attributes in rows with Datagrid

From: Date: Wed, 12 Jul 2006 15:28:58 +0000
Subject: RE: Attributes in rows with Datagrid
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24628@lists.php.net to get a copy of this message
Hi Mark: This is what I´ve done: require_once 'Structures/DataGrid/Renderer/HTMLTable.php'; class Structures_DataGrid_Renderer_ltHTMLTable extends Structures_DataGrid_Renderer_HTMLTable { function buildRow($index,$data) { parent::buildRow($index,$data); $tbody =& $this->_table->getBody(); $tbody->updateRowAttributes($this->_bodyStartRow + $index, array('tr_'.$index), true); } } And to set the renderer: $datagrid =& new Structures_DataGrid($options['limit'], $_REQUEST['page']); $datagrid->setRenderer('ltHTMLTable'); And that works! Now I get a unique id for each row. The only thing is that I need to save my unit containing the extended renderer in the same Renderer folder. How can I set the renderer saving my file anywhere? And second question, is this feature going to be included in the future? Thanks and regards. ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com

« previous php.pear.general (#24628) next »