在asp.net中分组和合并单元格后,Gridview单元格丢失了边框

时间:2014-08-06 10:16:31

标签: c# asp.net gridview

我有一个GridView,其中我根据类似的数据合并了三个列...分组和合并单元格工作正常。但我的GridView的某些单元格正在丢失边框线,看起来很难看......我想知道我的Gridview单元格松开边框的原因是什么......!

Vertical Lines are missing for GridView Cells

我想用适当的边框设置显示我的GridView .. 请帮帮我..

我的MarkUp代码:

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BorderStyle="None" BorderWidth="1px" GridLines="Both" CellPadding="4"
              Width="100%" Height="300px" OnRowDataBound="GridView1_RowDataBound" HeaderStyle-CssClass="fixedheadertable1">
 <Columns>
  <asp:BoundField DataField="District_Name" HeaderText="District Name">
    <FooterStyle HorizontalAlign="Right" />
    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Taluk_Name" HeaderText="Taluk Name">
    <FooterStyle HorizontalAlign="Right" />
    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
    <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Bank_Name" HeaderText="Bank Name">
    <FooterStyle HorizontalAlign="Right" />
    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
    <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Total_Beneficiaries" HeaderText="Total Beneficiaries">
    <FooterStyle HorizontalAlign="Right" />
    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
    <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Active_Beneficiaries" HeaderText="Active Beneficiaries">
    <FooterStyle HorizontalAlign="Right" />
    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
    <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Suspended_Beneficiaries" HeaderText="Suspended Beneficiaries">
    <FooterStyle HorizontalAlign="Right" />
    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
    <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Enrolled_Active_Beneficiaries" HeaderText="Enrolled Active Beneficiaries">
     <FooterStyle HorizontalAlign="Right" />
     <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
     <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
     <asp:BoundField DataField="Enrolled_Suspended_Beneficiaries" HeaderText="Enrolled Suspended Beneficiaries">
     <FooterStyle HorizontalAlign="Right" />
     <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
     <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Approved_By_Tahsildar_For_Enrollment" HeaderText="Approved By Tahsildar For Enrollment">
     <FooterStyle HorizontalAlign="Right" />
     <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
     <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Downloaded_By_Enrolment_Agency" HeaderText="Downloaded By Enrolment Agency">
     <FooterStyle HorizontalAlign="Right" />
     <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
     <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Enrolled_For_Tahsildar_Approval" HeaderText="Enrolled For Tahsildar Approval">
     <FooterStyle HorizontalAlign="Right" />
     <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
     <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Qualified_By_Tahsildar" HeaderText="Qualified By Tahsildar">
     <FooterStyle HorizontalAlign="Right" />
     <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
     <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Downloaded_Yet_To_Open_Account" HeaderText="Downloaded & Yet To Open Account">
     <FooterStyle HorizontalAlign="Right" />
     <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
     <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
  <asp:BoundField DataField="Uploaded_With_Account_Details" HeaderText="Uploaded With Account Details">
     <FooterStyle HorizontalAlign="Right" />
     <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
     <ItemStyle HorizontalAlign="Right" VerticalAlign="Middle" />
  </asp:BoundField>
 </Columns>
 <FooterStyle BackColor="#DFFFDF" Font-Bold="True" HorizontalAlign="Right" VerticalAlign="Middle" />
</asp:GridView>

仅使用Css是:

    .portletSmall .portletContent table {
    width: 975px;
}

    .portletSmall .portletContent table th {
    background-color:#DFFFDF;
    text-align: left;
    padding: 3px 0;
}

    .portletSmall .portletContent table td {
    padding-top: 3px;
    padding-bottom: 3px;
    vertical-align: top;
}

    .portletSmall .portletContent table td img {
    padding-top: 3px;
    padding-bottom: 3px;
    vertical-align: middle;
}

    .portletSmall .portletContent table .alternateRow {
    background-color: #EEEEF9;
}

    .portletSmall .portletContentScroll {
    width: 313px;
    overflow:scroll;
    /*overflow-y: scroll;*/
}
    .portletSmall .portletContentScrol2 {
    height: 380px;
    overflow:auto;

    /*overflow-y: scroll;*/
}

    .portletSmall .portletContentScroll table {
    width: 213px;
}

    .porletSmallRow .portletLeft {
    float: left;
}

    .porletSmallRow .portletRight {
    float: right;
}

    .portletSmall .leftCorner {
    background-image:url(../images/GreenLTcnr.gif);
    width: 8px;
    height: 15px;
}

    .portletSmall .rightCorner {
    background-image:url(../images/GreenRTcnr.gif);
    width:8px;
    height: 15px;
}

.fixedheadertable1
{
    left: 0px;
    position: relative;
    top: 0px;
    padding-right: 2px;
    padding-left: 2px;
    padding-bottom: 2px;
    padding-top: 2px;
}

0 个答案:

没有答案