Posted by Asbjørn Morell
on 04.01.2008 15:03
Hello,

I have changed one of my fields to an image. How do I change the height 
of the rows/tds to fit the image? What would be the best approach to 
style/modify the livegrid area. If I want something a bit more advanced 
than the standard table? I want to display 3 records pr. row. Is this 
possible?

Regards.
Asbjørn Morell.
Posted by Matt Brown
on 06.01.2008 03:35
All data rows have to be the same height -- displaying thumbnails that 
have all been cropped to the same size should work ok. Here is the style 
sheet I use to display thumbnails from Flickr:

<style type="text/css">
.ricoLG_bottom div.ricoLG_cell { height:80px; }
</style>


As for displaying multiple records per row, I can think of several 
approaches:

1) write a "clever" query that does the grouping for you - so the query 
does all of the work and as far as LiveGrid is concerned, it is still 
displaying one record per row. Of course, your ability to pull this off 
depends on the dataset you are trying to display and the capabilities 
your database.

2) use SimpleGrid instead. You can then do your grouping on the server. 
The disadvantage is that ALL of your records get sent to the grid at 
page load.

3) write a new buffer object to do the grouping on the client. This 
sounds like what you might have had in mind. It should certainly be 
feasible, but would entail some serious javascript time.

Good luck!

Matt
Posted by Asbjørn Morell
on 07.01.2008 07:41
Hallo Matt,

I had a frozen column - removed it and could set lineheight :)

1)
I have searched google and the MySQL documentation and I don't think
this is possible. Also asked in a few MySQL forums and I got the answer
that I should do the rearranging in my application layer (rico)
(rico) Please correct me if I am wrong.

2)
I don't want to load ALL records at pageload. (1000 of records/to slow)

3)
This is beyond my java capabilities. :(

Unless it can be done by MySQL I think I will have to drop the idea, and
hope that rico some time in the future will get this feature
implemented.

Best regards.
Asbjørn Morell.
Posted by Mark Moran
on 07.01.2008 14:12
By application layer I think they meant your server side application, IE 
php, jsp,  asp.
Posted by Asbjørn Morell
on 08.01.2008 18:15
I almost got it working :)

You can see the result here:
http://www.kunstpladsen.dk/rico/examples/php/ex3.php

Can you help me with these 2 bugs?

1.
Something bad happens when I scroll down to the bottom of the livegrid
table. Rico says loading data but nothing happens. Also the screen seems
to jump up a few lines.

2.
How can it be that I can't use my keybard to navigate the livegrid
table? (arrows and page up/down)

hmmmm this forum won't let me post the code :/ Here is a link to the 
source:
http://www.kunstpladsen.dk/rico/plugins/php/ricoXmlResponse.txt

I modified the function Query2xmlRaw_Limit.

Best regards.
Asbjørn Morell.
Posted by Matt Brown
on 10.01.2008 04:54
Since you are returning 3 records per row, I think the returned 
<rowcount> element is being miscalculated. For example, this response:

   <rows update_ui='true' offset='115'>

contains 11 <tr> tags, so I would expect <rowcount> to contain 126, but 
it instead returns 139???

Matt