|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
ASP.net can create HTML tables with Datagrid and Table controls. Is there an
ASP.net control that allows me to build an HTML table with a THEAD row? Repeater.
Show quoteHide quote "Arne" wrote: > ASP.net can create HTML tables with Datagrid and Table controls. Is there an > ASP.net control that allows me to build an HTML table with a THEAD row? Phillip
Can I access the <THEAD> in the repeater and add a style? Arne Show quoteHide quote "Phillip Williams" wrote: > Repeater. > > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Arne" wrote: > > > ASP.net can create HTML tables with Datagrid and Table controls. Is there an > > ASP.net control that allows me to build an HTML table with a THEAD row? Hi Arne,
Since the Repeater control is the only Web control that allows you to split markup tags across the templates. you can write something like this to get a THEAD and TBODY section: <asp:Repeater id=Repeater1 runat="server"> <HeaderTemplate> <table border=1 id="table1"> <THEAD > <tr> <th><b>Company</b></td> <th><b>Symbol</b></td> </tr> </THEAD> </TBODY> </HeaderTemplate> <ItemTemplate> <tr> <td> <%# DataBinder.Eval(Container.DataItem, "Name") %> </td> <td> <%# DataBinder.Eval(Container.DataItem, "Ticker") %> </td> </tr> </ItemTemplate> <FooterTemplate> </TBODY> </table> </FooterTemplate> </asp:Repeater> You can then style them like this: <style> #table1 thead td{ /*style definition for the cell within a thead*/ } #table1 tbody td{ /*style definition for the cell within a tbody*/ } </style> Show quoteHide quote "Arne" wrote: > Phillip > > Can I access the <THEAD> in the repeater and add a style? > > Arne > > "Phillip Williams" wrote: > > > Repeater. > > > > -- > > HTH, > > Phillip Williams > > http://www.societopia.net > > http://www.webswapp.com > > > > > > "Arne" wrote: > > > > > ASP.net can create HTML tables with Datagrid and Table controls. Is there an > > > ASP.net control that allows me to build an HTML table with a THEAD row? Correction:
The THEAD section should look like that instead: <THEAD > <tr> <th>Company</th> <th>Symbol</th> </tr> </THEAD> and the equivalent style should be like this: <style> #table1 thead th{ /*style definition for the cell within a thead*/ } #table1 tbody td{ /*style definition for the cell within a tbody*/ } </style> Show quoteHide quote "Phillip Williams" wrote: > Hi Arne, > > Since the Repeater control is the only Web control that allows you to split > markup tags across the templates. you can write something like this to get a > THEAD and TBODY section: > > <asp:Repeater id=Repeater1 runat="server"> > <HeaderTemplate> > <table border=1 id="table1"> > <THEAD > > <tr> > <th><b>Company</b></td> > <th><b>Symbol</b></td> > </tr> > </THEAD> > </TBODY> > </HeaderTemplate> > > <ItemTemplate> > <tr> > <td> <%# DataBinder.Eval(Container.DataItem, "Name") %> </td> > <td> <%# DataBinder.Eval(Container.DataItem, "Ticker") %> </td> > </tr> > </ItemTemplate> > > <FooterTemplate> > </TBODY> > </table> > </FooterTemplate> > </asp:Repeater> > > You can then style them like this: > > <style> > #table1 thead td{ > /*style definition for the cell within a thead*/ > } > #table1 tbody td{ > /*style definition for the cell within a tbody*/ > } > </style> > -- > HTH, > Phillip Williams > http://www.societopia.net > http://www.webswapp.com > > > "Arne" wrote: > > > Phillip > > > > Can I access the <THEAD> in the repeater and add a style? > > > > Arne > > > > "Phillip Williams" wrote: > > > > > Repeater. > > > > > > -- > > > HTH, > > > Phillip Williams > > > http://www.societopia.net > > > http://www.webswapp.com > > > > > > > > > "Arne" wrote: > > > > > > > ASP.net can create HTML tables with Datagrid and Table controls. Is there an > > > > ASP.net control that allows me to build an HTML table with a THEAD row?
objectdatasource.update() fires System.InvalidOperationException
DropDownList not giving the selected item when a Button is clicked... please help newbie... Button Click event not firing GridView Multi Select ? Viewing Composite Controls at Design Time Hide SideBar of Wizard Control Custom type converter How to filter file types when using the HTMLInputFile control... Table - no ViewState Better tool for selection - Datagrid or DataList? |
|||||||||||||||||||||||