PDA

View Full Version : Conditional Grid Scrollbar



ilazarte
4 Feb 2007, 11:02 PM
I'm implementing a type of grid, because I need the html to be crawlable. I looked at the blog and help, but it doesn't seem that yui-ext Grid can accept existing html. Is this true?

If it is, what is the best way to add a conditional scrollbar to an element that behaves like the grid's scrollbar? Is it a another z layer that is written in if the content size is exceeded, or is it an overflow: scroll thing?

Thanks for the help.

ilazarte
5 Feb 2007, 9:36 PM
just looking for a quick summary! help!

JeffHowden
5 Feb 2007, 10:00 PM
Probably what you'll want to look into is generating a valid (X)HTML representation of your tabular data using a table with proper thead, tbody, tfoot, th, and td markup. Then, you'll need to extend the grid with a fromMarkup() method that'll take your markup and convert it to the data model.

Or, skip the fromMarkup() method entirely. Render your HTML to the div that will become the container for your grid. Then, use the standard yui-ext code to render the yui-ext grid to the same container div which will replace the table.

ilazarte
6 Feb 2007, 2:54 PM
I knew there was a good reason I asked here. The first option sounds like a winner. I'll look into using this.