Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #484 (closed defect: wontfix)

Opened 13 years ago

Last modified 12 years ago

widgets.grid.Grid uses sample data when the rowset is empty

Reported by: Stephen Thorne <stephen@…> Owned by: anonymous
Priority: normal Milestone:
Component: TG Widgets Version:
Severity: critical Keywords:
Cc:

Description

When using widgets.grid.Grid, Grid(headers=foo?, rows=[]), the sample data is used, instead of showing no rows.

Demonstration of error:

>>> from turbogears.widgets.grid import Grid
>>> print Grid(headers=['foo'], rows=[]).render()
<DIV>
<LINK HREF="/tg_static/css/widget.css" TYPE="text/css" REL="stylesheet">

<TABLE CELLPADDING="0" BORDER="0" CELLSPACING="1" ID="grid" CLASS="grid form_container ">
    <THEAD>
        <TD>
            foo
        </TD>
    </THEAD>
    <TR CLASS="even">
        <TD>
          A
        </TD><TD>
          Ant
        </TD><TD>
          Audi
        </TD><TD>
          Apple
        </TD>
    </TR>
...
        </TD><TD>
          Coconut
        </TD>
    </TR>
</TABLE>
</DIV>

Change History

comment:1 Changed 13 years ago by michele

  • Status changed from new to closed
  • Resolution set to wontfix

widgets.grid.Grid is deprecated (it will be removed soon).

Use the wiki:DataGridWidget instead.

Note: See TracTickets for help on using tickets.