我已经有了一个绑好的DataGrid 控件.
         DataSet sss=new DataSet();
DataGrid1.DataSource=sss;
DataGrid1.DataBind();
我想让它的没有边框    列和列之间没有分隔    行和行之间用虚线表示.如:
    aaa1  bbb1  ccc1
   -------------------
    aaa2  bbb2  ccc2
   -------------------
    aaa3  bbb3  ccc3
我不知道怎样完成这个样式.请大家帮助.

解决方案 »

  1.   

    如果你要求好的灵活性还是用repeater,用模板自己控制.
      

  2.   

    <ItemTemplate>
    表格内容自己在DW里改
    </ItemTemplate>
      

  3.   

    使用 DataList
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <style type="text/css">
    <!--
    .underline {
    border-bottom-style: dashed;
    border-bottom-color: #333333;
    border-bottom-width: 1px;
    }
    -->
    </style>
    </head>
    <body>
    <form runat="server">
    <asp:DataList ID="dltTest" runat="server">
    <itemtemplate>
    <table width="500" border="1">
      <tr>
        <td class="underline"><%# DataBinder.Eval(Container.DataItem,"") %></td>
        <td class="underline">&nbsp;</td>
        <td class="underline">&nbsp;</td>
      </tr>
    </table></itemtemplate>
    </asp:DataList>
    </form></body>
    </html>
      

  4.   

    我原来的程序都是用DataGrid做的.不能用DataList或repeater呀!
    我只是想把 行和行之间用虚线 分开.这可很难吗?
      

  5.   

    我也遇到这个问题了,
    用的方法和 cucu_love_lilie(钱钧) 的一样。
    用了模板列,里边放了一个Table,
    <table  border="0" align="center" cellpadding="0" cellspacing="0"  class= "table_bottom_border" >   </table>
    在样式里定义了 .table_bottom_border
    {
             border-bottom-width: 1px;
    border-bottom-style: dashed;
    border-bottom-color: #666666;
    }这样出来就是楼主要的效果了。
      

  6.   

    http://blog.csdn.net/goody9807/archive/2004/06/29/29525.aspx