본문 바로가기

All363

jqgrid tree 예제,,, 쿼리 계층구조 쿼리 select * from (SELECT ID , NAME , LV , DECODE( LV , 0 ,'',PARENT_ID) PT , decode( (select count(1) from Table where PARENT_ID =A.CLASS_ID) , 0 , 'true' , 'false') LF , 'false' EX FROM Table A ) START with LV =0 connect by PRIOR ID = PT js /----------------------- jQuery(document).ready(function() { // 리스트 jQuery("#tableList1").jqGrid({ datatype: "json", height: 390, width: 'auto', col.. 2012. 9. 3.
jqgrid 리스트 만들기 jQuery(document).ready(function() { // 리스트 jQuery("#tableList1").jqGrid({ datatype: "local", height: 300, colNames:['대분류ID','대분류'], colModel:[ {name:'TB_ID',hidden:true,index:'TB_ID', width: 60, sorttype:"string", editable: false, align:"center"}, {name:'TB_NAME',index:'TB_NAME', width: 60, sorttype:"string", editable: false, align:"center"} ], onSelectRow: function(id) { if(id && id!==lastsel1).. 2012. 9. 3.
jqgrid 마지막 row 추가 function resultInsert1( obj ) { if(obj.HEADER.SCC_YN == "true") { //신규 리스트 저장 성공 numberOfRecords1 ++; var datarow = saveData1.DATA[0]; jQuery.each(datarow , function(name, val){ if( $("#"+name).attr("type") == "select-one" ) { datarow[name] = $("#"+name+" :selected").text(); } }); var su=jQuery("#tableList1").jqGrid('addRowData',numberOfRecords1,datarow); if(su) { $("#tableList1").setSelection(n.. 2012. 9. 3.
jqgrid row 수정 function updateList() { // 리스트 변경 ///////////// var id = jQuery("#tableList").jqGrid('getGridParam','selrow'); var datarow = saveData1.DATA[0]; jQuery.each(datarow , function(name, val){ if( $("#"+name).attr("type") == "select-one" ) { datarow[name] = $("#"+name+" :selected").text(); } }); var su=jQuery("#tableList").jqGrid('setRowData',id,datarow); if(su) { var ret = jQuery("#tableList").getRow.. 2012. 9. 3.