用<Itemtemplate>只能显示一列而且不能显示列名。
怎么能搞成像DataGrid  中设置DataSource 和DataBind()以后出现的结果 一样。。

解决方案 »

  1.   

    Reoeart里面的模版列可以使用HTML代码。可以像原先ASP的方式写数据到浏览器
      

  2.   

    那就不能像DataGrid 那样能显示出列名了啊。。只能显示出列的内容。。
      

  3.   

    參看孟老大的文章:
    http://dotnet.aspx.cc/ShowDetail.aspx?id=54F4C732-AAE2-4135-FB1B-7B4B613BAA33
      

  4.   

    我来了,向大家介绍一个网站,http://www.lookm.com/freefilm.htm?user=litao是完全免费的!
      

  5.   

    回复人: ylonghome(幽龙之潭) ( ) 信誉:99  2004-08-16 09:41:00  得分: 0  
     
     
       那就不能像DataGrid 那样能显示出列名了啊。。只能显示出列的内容。。
      
     
    ====================================<asp:repeater id="ProjectRep" Runat="server">
    <HeaderTemplate>
    <TABLE class="tabletoolbar" cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
    <tr>
    <td>
    这里写表头
    </td>
    </tr>
    </HeaderTemplate><ItemTemplate>
    <TR>
    <TD>
    <asp:Label Runat="server" ID="strColumns" Text='<%# DataBinder.Eval(Container.DataItem, "项目名称")%>' Visible="False">
    </asp:Label>
    </TD>
    </TR>
    </ItemTemplate>
    <FooterTemplate>
    </Table>
    </FooterTemplate>
    </asp:repeater>
    =====================================================================
    或者画一个Table 第一行在Repeart的外面。