Location: PHPKode > projects > Livraria Navi - Ej Project > LivrariaNavi.03/includes/editora.php
<h3>Editoras Cadastradas</h3>
<table id="s1list" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="s1pager" class="scroll" style="text-align: center;"></div>

<script type="text/javascript">
jQuery(document).ready(function(){
var gridimgpath = 'themes/sand/images';
var lastsel3; 
var mygrid = jQuery("#s1list").jqGrid({
   	url:'includes/buscaEditora.php?q=1',
	datatype: "json",
   	colNames:['Cód','Nome','Contato','CNPJ','Data Cadastro'],
   	colModel:[
   	   		{name:'cod_editora',index:'cod_editora', width:40,editable:true,hidden:true,editoptions:{edithidden:true,readonly:true,size:10}},
   	   		{name:'nom_editora',index:'nom_editora', width:350,editable:true,editoptions:{size:40,maxlength:100},formoptions:{ rowpos:2, label: "NOME", elmprefix:"(*)"},editrules:{required:true}},
   	   		{name:'des_contato',index:'des_contato', width:200,editable:true,editoptions:{size:40,maxlength:100},formoptions:{ rowpos:3, label: "CONTATO", elmprefix:"    "},editrules:{required:false}},
   	   		{name:'cod_cnpj',index:'cod_cnpj', width:150,editable:true,editoptions:{size:40,maxlength:14},formoptions:{ rowpos:4, label: "CNPJ", elmprefix:"(*)"},editrules:{required:true,number:true}},   		
   	   		{name:'dat_cadastro',index:'dat_cadastro', width:100,editable:false,search:false,formatter:'date',editoptions:{size:40,readonly:true},formoptions:{ rowpos:5, label: "DATA CADASTRO", elmprefix:"(*)"},editrules:{required:true}},   		
   	],
   	rowNum:10,
	sortable:true,
   	autowidth: true, 
   	rowList:[10,20,30],
   	pager: '#s1pager',
   	sortname: 'nom_editora',
    viewrecords: true,
    sortorder: "asc",
    caption:"Editoras Cadastradas",
    editurl:"includes/editaEditora.php",
	height:"100%"
});
function pickdates(id){ jQuery("#"+id+"dat_cadastro","#s1list").datepicker({dateFormat:"yy-mm-dd"}); } 
jQuery("#s1list").jqGrid('filterToolbar',{autosearch:true,searchOnEnter:false});
jQuery("#s1list").jqGrid('navGrid','#s1pager',{addtext:'Incluir',edittext:'Alterar',deltext:'Excluir',viewtext:'Exibir',refreshtext:'Recarregar',edit:true,add:true,del:true,search:false,refresh:true},{width:400},
		{view:true}, //options
		{jqModal:true,checkOnUpdate:true,savekey: [true,13], width:400, navkeys: [true,38,40], checkOnSubmit : true, reloadAfterSubmit:false, closeOnEscape:true, bottominfo:"(*)Campo Obrigatório"}, // edit options
		{jqModal:true,checkOnUpdate:true,savekey: [true,13], width:400, navkeys: [true,38,40], checkOnSubmit : true, reloadAfterSubmit:false, closeOnEscape:true,bottominfo:"(*)Campo Obrigatório"}, // add options
		{reloadAfterSubmit:false,jqModal:false, closeOnEscape:true}, // del options
		{closeOnEscape:true}, // search options
		{navkeys: [true,38,40], height:250,jqModal:false,closeOnEscape:true} // view options
		)
})
</script>
Return current item: Livraria Navi - Ej Project