<div id="container_pasi_parths_set" style="height:100%; margin:0px; padding:0px;overflow:'hidden'; border: 0px solid #cd0a0a">
	<div class="pane-header ui-state-active" id="pasi_parths_set_bar" >    

	<button id="btnrawmaterial" >Get Material Reff</button>
</div>
<table id="tbl_parths"></table> <div id="ptbl_parths"></div>
</div>
<script type="text/javascript">
    
    $(document).ready(function(){
		$(window).bind('resize', function() {  
			setTimeout(function(){
				setGridHight($("#tbl_parths"),$("#container_pasi_parths_set"),$("#pasi_parths_set_bar")); 
			},10); 
		});

		$("#btnrawmaterial").button().click(function(){
			$("#frmitemlistdlg").load('<?php echo base_url().'pasi_settings/ct_rawmaterial_reff/view_rawmaterial_reff_itemlist'; ?>',  {parmeter:'parameter'}, function() {
				$("#frmitemlistdlg").dialog({
					modal:true,
					width : 694,
					height : 499,
					buttons: {
                        "Close": function() {  
							$(".ui-dialog-titlebar-close").trigger('click');  
							
						}
                    },
					close : function(){
						$('#frmitemlistdlg').dialog("destroy"); 
					    $(".frmitemlistdlg_cl").remove(); 
					    $("body").append('<div id="frmitemlistdlg" title="ITEM LIST" class="frmitemlistdlg_cl"></div>'); 
						
					},
					open: function(){
						$("body").unblock();
						
					}
				});
			});
		
		
		});	
		
		jQuery("#tbl_parths").jqGrid({
			url:'<?php echo base_url().'pasi_settings/ct_rawmaterial_reff/loadData'; ?>',
			mtype : "post",
			postData:{'q':'1'},
			datatype: "json",
			colNames:['id', 'Item No','Part Name', 'Unit','Create Date','Create By','Update Date','Update By', 'Status'],
			colModel:[
			
				{name:'id_raw_material',index:'id_raw_material', width:60, hidden:true},
				{name:'itemno',index:'itemno', width:318},
				{name:'partno',index:'partno', width:316},
				{name:'unit',index:'unit', width:185},				
				{name:'create_date',index:'create_date', width:318},
				{name:'create_by',index:'create_by', width:316},
				{name:'update_date',index:'update_date', width:185,},
				{name:'update_by',index:'update_by', width:185,},
				{name:'status',index:'status', width:86,},
				
				],
			rowNum:15,
			rowList:[15,25,35],
			pager: '#ptbl_parths',
			sortname: 'id_raw_material',
			viewrecords: true,
			sortorder: "asc",
			width: '',
			height:100,
			jsonReader: { repeatitems : false },
			caption:"Data Part HS",
			rownumbers: true,
			shrinkToFit: false,
			afterInsertRow: function(){
				
				
			},			
			gridComplete: function(){
				
			},
		}); 
			
                        
		jQuery("#tbl_parths").jqGrid('navGrid','#ptbl_parths',{del:false,add:false,edit:false},{},{},{},{multipleSearch:false});
		jQuery("#tbl_parths").jqGrid('filterToolbar',{stringResult: true,searchOnEnter : true, defaultSearch: 'cn', ignoreCase: true});
		
			setTimeout(function(){
				setGridHight($("#tbl_parths"),$("#container_pasi_parths_set"),$("#pasi_parths_set_bar")); 
			},100); 

	});
		  	
</script>
<div id="frmitemlistdlg" title="ITEM LIST" class="frmitemlistdlg_cl"></div>



	
	