How to do DataTable without caption block

View: New views
3 Messages — Rating Filter:   Alert me  

How to do DataTable without caption block

by Chris Curran-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm on 2.5.2 and using the DataTable with mucho success. One issue
though: It appears YUI is inserting a "<caption/>" block before the
DataTable and that's screwing up my screen formatting (a blank row
where it doesn't belong). How do I tell YUI to stop inserting empty
caption block with my DataTable?

thanks,
Chris


Re: How to do DataTable without caption block

by Satyam-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The DataTable doesn't put any caption in the table unless you explicitly
tell it to via the caption configuration setting. The attribute defaults
to null and it won't make any caption, the actual code that produces it
starts with:

 if(this._elTable && sCaption)

So with sCaption == null (the default), it won't even create an empty
caption element.

Satyam


Chris Curran wrote:

> I'm on 2.5.2 and using the DataTable with mucho success. One issue
> though: It appears YUI is inserting a "<caption/>" block before the
> DataTable and that's screwing up my screen formatting (a blank row
> where it doesn't belong). How do I tell YUI to stop inserting empty
> caption block with my DataTable?
>
> thanks,
> Chris
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.173 / Virus Database: 270.7.6/1716 - Release Date: 09/10/2008 9:44
>
>  

Re: How to do DataTable without caption block

by Chris Curran-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> So with sCaption == null (the default), it won't even create an empty
> caption element.
>

Ha! OK, I figured it out. I have a "standard" table setup function.
One of it's parms is the caption. In this particular case I'm calling
that setup func with a caption of "" (empty string). I changed my
setup func to test caption before setting it:

    if (caption != "")
        obj.set("caption", caption);

and now all is fine.

Thanks boss.


LightInTheBox - Buy quality products at wholesale price!