如何正确地将bootstrap样式设置为寻呼机Gridview ASP.Net

时间:2012-10-31 02:03:05

标签: asp.net gridview twitter-bootstrap

我有一个gridview,想要在gridview中实现bootstrap,我已成功使用Header和RowItem,但在Pager Grid视图中失败了。

这是我的代码:

<asp:GridView ID="GridNews" runat="server"  AllowPaging="True" PageSize="2" onpageindexchanging="GridNews_PageIndexChanging"
  CssClass="table table-hover table-striped table-condensed" GridLines="None"
  AutoGenerateColumns="False">
  <Columns>
    <asp:BoundField DataField="news_id" HeaderText="ID" Visible="false" />
    <asp:BoundField DataField="date" HeaderText="Date" ItemStyle-Width="50%" />
    <asp:TemplateField HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle" HeaderText="Title" ItemStyle-HorizontalAlign="Center" >
    <ItemTemplate>
      <asp:HyperLink ID="LinkEvents" runat="server" Target="_blank" navigateUrl='<%# "EventsDetail.aspx?choice=investor&ev=" + Eval("news_id") %>' Text='<%# Eval("title") %>'> 
       </asp:HyperLink>
    </ItemTemplate>
    </asp:TemplateField>
  </Columns>

我错过了什么吗?

请帮助我,谢谢

0 个答案:

没有答案