Datagrid
<script type='text/javascript'>
$(function() {
var datanya = <?php echo json_encode($_POST); ?>;
var type = '<?=$TANDA; ?>';
$("#result").datagrid({
//url : $.post('<?= site_url() ?>/tiket/searchResult/',datanya,'success'),
url : '<?= site_url() ?>/masterp/searchResult/type/'+type,
method : 'POST',
queryParams: datanya,
columns:[[
{field:'Cust_ID',title:'Cust_ID',sortable:true,formatter:formatCustomerIda},
{field:'KD_Cust',title:'KD_Cust',sortable:true},
{field:'Nama_Cust',title:'Nama_Cust',sortable:true},
{field:'Alamat',title:'Alamat',sortable:true},
{field:'Telp',title:'Telp',sortable:true},
{field:'CP',title:'CP',sortable:true},
{field:'Nama_CustType',title:'Cust Type',sortable:true},
{field:'IsAktif',title:'IsAktif',sortable:true,formatter:formatPrice}
]],
showHeader:"true",
toolbar:"#toolbard",
pagination:"true",
nowrap: "false",
pageSize: 10,
fitcolumns: "true",
rownumbers: "false",
singleSelect: "true"
})
});
</script>
Javascript merubah warna
<script>
function formatCustomerIda(val,row){
var url = "customerView.php?id=";
return '<a href="#" onclick="ADDDatas()"><span style="color:red;">'+val+'</span></a>';
}
</script>
Tidak ada komentar:
Posting Komentar