Re: question about Structures_DataGrid

From: Date: Tue, 15 May 2007 12:12:47 +0000
Subject: Re: question about Structures_DataGrid
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-27297@lists.php.net to get a copy of this message
Hi, Anton Tobolchenko wrote: > Hi, I am a web programmer from Russia. > First of all, excuse my bad english =) > I have a question about *Structures_DataGrid* class. > I read documentation on > > http://pear.php.net/manual/en/package.structures.structures-datagrid.php#package.structures.structures-datagrid.structures-datagrid-datasource > but > i didn't understand how it work. > Please, help me.I think that i will understand all, if i saw a correctly > code. > For example, lets take such task: create table with 2 columns and 3 rows. > First - checkboxes and secont - simple static text (not edit). > In the beginning we have array with data. [...] This can be achieved by the code that you've sent yesterday. Just correct it (I gave you the needed hints in my answer) and you're done. > And table we need to build on that > array (take from array information about which checkbox is checked and what > is the static text will be near it). Which php code will generate such > table if we a using pear *Structures_DataGrid* class? If you want to have the checkbox next to the text in one column, you need a column formatter. Explaination and examples can be found in the manual: http://pear.php.net/manual/en/package.structures.structures-datagrid.formatter.php http://pear.php.net/manual/en/package.structures.structures-datagrid.example-advanced.php If you want to have a separate checkbox column, our new CheckableHTMLTable renderer might be interesting for you. It can be found in CVS. (This renderer is still in development, its name and code might change prior to a first official release.) Regards, Mark -- http://www.markwiesemann.eu

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