0

我已经构建了一个 GridView,其中每一行都有一个 GridView。因此,对于最上面的 GridView,我想修复标题和寻呼机,以便只能使用 jquery 滚动其内容。我尝试过 Google 的各种脚本。有些工作,有些不工作。那些工作的有浏览器不兼容。所以我需要跨浏览器解决方案。请给我一个工作示例。

<asp:GridView ID="gvMasterGrid" runat="server" AllowSorting="True" AutoGenerateColumns="False"
            DataSourceID="odsMasterGrid" OnRowDataBound="gvMasterGrid_RowDataBound" PageSize="3"
            AllowPaging="True" OnPageIndexChanging="gvMasterGrid_PageIndexChanging" OnPreRender="gvMasterGrid_PreRender">
  <Columns>
    <asp:TemplateField>
      <ItemTemplate>
        <img alt="" id="plus" style="cursor: pointer" src="Images/plus.jpg" width="20px"
            height="20px" />
        <asp:Panel ID="pnlChildGrid" runat="server" Style="display: none">
          <asp:GridView ID="gvChildGrid" runat="server" AutoGenerateColumns="true" CssClass="subgridview">
          </asp:GridView>
        </asp:Panel>
      </ItemTemplate>
    </asp:TemplateField>
    <asp:BoundField DataField="CustomerID" HeaderText="CustomerID" SortExpression="CustomerID" />
  </Columns>
  <PagerStyle HorizontalAlign="Center" />
</asp:GridView>

我希望 gvMasterGrid 有固定的页眉和页脚。gvMasterGrid 的行应该是可滚动的。

4

0 回答 0