DataGridView隐藏列用CSS实现

 隐藏DataGridView某一列,用CSS控制 

CSS Code:

  .hidden{ display:none;}

c# Code:

<asp:BoundField DataField="id" HeaderText="id">

  <ControlStyle CssClass="hidden" />

  <ItemStyle CssClass="hidden" />

  <HeaderStyle CssClass="hidden" />

  <FooterStyle CssClass="hidden" />

</asp:BoundField>

posted @ 2014-06-25 10:44  泽刚  阅读(398)  评论(0编辑  收藏  举报