作成日: 2014/10/02 最終更新日: 2014/10/02
文書種別
使用方法
詳細
GridViewに表示するデータが0件の場合、ベージ番号が表示されるフッターはヘッダーのすぐ下に表示されます。これを回避するためにはグリッドのコンテナの高さを固定値に設定し、ページャの「position」「bottom」「width」属性を設定します。
◎サンプルコード (aspx)
◎サンプルコード (aspx)
<head runat="server">
----------
----------
----------
<script type="text/javascript">
function set_height_Footer() {
//グリッドのコンテナの高さを変更する
$("#gridviewDiv").height($(this).height() - 20);
//フッターをグリッドの下部に配置する
$(".wijmo-wijgrid-footer").css({
position: "fixed",
bottom: "10px",
width: $("#gridviewDiv").width() - 6 + "px"
});
}
$(window).resize(function () {
set_height_Footer();
});
$(document).ready(function () {
set_height_Footer();
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="gridviewDiv">
<wijmo:C1GridView ID="C1GridView1" runat="server" AllowPaging="True" CallbackSettings-Action="Paging" Height="100%" Width="100%" />
</div>
</form>
</body>
----------
----------
----------
<script type="text/javascript">
function set_height_Footer() {
//グリッドのコンテナの高さを変更する
$("#gridviewDiv").height($(this).height() - 20);
//フッターをグリッドの下部に配置する
$(".wijmo-wijgrid-footer").css({
position: "fixed",
bottom: "10px",
width: $("#gridviewDiv").width() - 6 + "px"
});
}
$(window).resize(function () {
set_height_Footer();
});
$(document).ready(function () {
set_height_Footer();
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="gridviewDiv">
<wijmo:C1GridView ID="C1GridView1" runat="server" AllowPaging="True" CallbackSettings-Action="Paging" Height="100%" Width="100%" />
</div>
</form>
</body>
旧文書番号
80972