「Phpgrid語法」:修訂間差異
跳至導覽
跳至搜尋
| 第28行: | 第28行: | ||
</style> | </style> | ||
</css> | </css> | ||
==自動更新頁數== | |||
<VB> | |||
<script type="text/javascript"> | |||
// REFRESH EVERY 1 MIN | |||
window.setTimeout( refreshGrid, 1000); | |||
function refreshGrid() | |||
{ | |||
var myDate= new Date(); | |||
var grid = jQuery("#v_WMMOCTA"); | |||
i=parseInt(grid.getGridParam("page"))+10; | |||
if (i >parseInt(grid.getGridParam("lastpage"))) i=1; | |||
grid.setGridParam({ | |||
page: i | |||
}); | |||
grid.trigger("reloadGrid"); | |||
window.setTimeout(refreshGrid, 1000); | |||
} | |||
</script> | |||
</vb> | |||
於 2015年10月21日 (三) 21:27 的修訂
<php> $sg1 -> set_col_property("TA003",
array("formatter"=>"string",
"sorttype"=>"date"))->enable_advanced_search(true);
</php>
變更Column Color
<php> <?php ... $dg->set_col_property('orderNumber', array('classes'=>'comppk')); $dg->set_col_property('productCode', array('classes'=>'comppk')); ... ?> </php> <css> <style>
.comppk{background-color: greenyellow !important;}
</style> </css>
變更phpgrid header顏色
<css>
<style type="text/css">
.ui-jqgrid .ui-widget-header {
border: 1px solid #0b3e6f;
background: #0b3e6f url(
) 50% 50% repeat-x;
color: #f6f6f6;
}
</style>
</css>
自動更新頁數
<VB> <script type="text/javascript"> // REFRESH EVERY 1 MIN window.setTimeout( refreshGrid, 1000);
function refreshGrid()
{
var myDate= new Date();
var grid = jQuery("#v_WMMOCTA"); i=parseInt(grid.getGridParam("page"))+10; if (i >parseInt(grid.getGridParam("lastpage"))) i=1;
grid.setGridParam({
page: i
});
grid.trigger("reloadGrid");
window.setTimeout(refreshGrid, 1000);
}
</script> </vb>