是否可以将网格视图的asp.net寻呼机控件放入tfoot
部分?
//Render thead tfoot sections
Private Sub Page_PreRenderComplete(sender As Object, e As EventArgs) Handles Me.PreRenderComplete
If gv.Rows.Count > 0 Then
gv.HeaderRow.TableSection = TableRowSection.TableHeader
gv.FooterRow.TableSection = TableRowSection.TableFooter
End If
End Sub
//Initiate pager
Protected Sub gv_PageIndexChanging(sender As Object, e As GridViewPageEventArgs) Handles gv.PageIndexChanging
gv.PageIndex = e.NewPageIndex
Bind_gv()
End Sub
默认情况下,Pager会自动在表体中生成tr
,如果指定则在顶部生成。
渴望输出
<table id="gv">
<thead></thead>
<tbody>
//Table data ...
</tbody>
<tfoot>
//Pager here
</tfoot>
</table
答案 0 :(得分:1)
是的,你可以做到。您必须添加以下代码:
gv.BottomPagerRow.TableSection = TableRowSection.TableFooter