Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SHIN WOOCHUL

Pages: [1]
1
Help for ParamQuery Pro / Re: How to I set combo box in grid cell?
« on: November 26, 2019, 08:03:47 am »
I apply this code but it happen error that it does not have label,
so I wonder how to set data arrayList into this select box editor
also Is It possible to setting like  <opiton value = 'value'>name</option> like this structure?

2
Help for ParamQuery Pro / How to I set combo box in grid cell?
« on: November 25, 2019, 04:27:54 pm »
I used cell select combo box, but I don't know how to use it,
I want  column set like this
{ title: "회사 코드", width: "120", dataIndx: "Country",
                cls: 'beige',               
                editor: {
                    type: 'select',   
                    options: function(ui){
                       
                       var itemCd = ui.rowData.itemCd;
                       alert(itemCd);
                       var formData = new FormData(document.getElementById('selectItem'));
                       $('#kitemCd').val(itemCd);
                       $.ajax({
                         type : "POST",
                          contentType: false,
                            processData: false,
                         url : "/OrderMng/odr05/selectContractList.do",
                         cache : false,
                         data : formData,
                         success : function(json,status){
                            var $cell = ui.$cell;
                              var dataIndx = ui.dataIndx;
                              var cls = ui.cls;
                            var compList = json.resultList;
                        var innerHtml = '<select id="example" name="'+dataIndx+'" multiple="multiple" class="'+cls+'">';
                             for(var i = 0;i<compList.length;i++){                                
                                innerHtml += '<option value="'+compList.compCd+'">'+compList.compNm+'</option>';
                             }
                             innerHtml += '</select>';   
                             $cell.html(innerHtml);
                         
                         }
                       });
                    }
                }
            },
but it can make select box but it dose not work select data, It that good idea how to make select box?

3
Hi, I'd like to use selectionMode: cell to display the selected cell value, but at the same time I would like to highlight the row in which the selected cell is. How can it be done?

4
Help for ParamQuery Pro / Re: It now works resize column
« on: October 04, 2019, 06:28:00 am »
But I remove width % and I did not set resizable  ability, this is my code
But It still not resize column, Only used mouse db click can resize size
Code: [Select]
function setGrid01(list) {

var colM = [ {
title : "<msg:message code="label.partNo"/>",
//width : '30%',
dataIndx : "itemCd",
editable : false
}, {
title : "<msg:message code="label.partNm"/>",
//width : '40%',
dataIndx : "engItemNm",
editable : false
}, {
title : "planQnty",
//width : '10%',
format : '##,##0',
dataType : "float",
dataIndx : "planQnty",
}, {
title : '<msg:message code="btn.delete"/>',
dataIndx : "check",
type : 'checkbox',
cbId : 'chk'

}, {
dataIndx : 'chk',
dataType : 'bool',
cb : {
header : false
},
hidden : true,
editable : function(ui) {
//Number(list[i].orderQnty) <=(Number(list[i].inQnty)+Number(list[i].deliveryAllQnty))
return true;
}

} ];

var obj = {
width : '100%',
height : 300,
colModel : colM,
title : '<i class="fa fa-cogs"></i><msg:message code="box.itemList"/>',
loadonce : false,
hwrap : true,
wrap : true,
dataModel : {
data : list
},
sort : function() {
autoMerge(this);
},
flex : {
one : true
},
scrollModel: { autoFit: true },
};

gridObj01 = obj;
$("#grid01").pqGrid(obj);
}

function setGrid02(list) {
console.log(list);
var colM = [ {
title : "<msg:message code="label.itemNo"/>",
width : '30%',
dataIndx : "prtCd",
editable : false
}, {
title : "<msg:message code="label.itemNm"/>",
width : '40%',
dataIndx : "engItemNm",
editable : false
}, {
title : "DemandQnty",
width : '5%',
format : '##,##0',
dataType : "float",
dataIndx : "demandQnty",
editable : false
}, {
title : "RemainQnty",
colModel : [ {
title : "D100",
width : '5%',
format : '##,##0',
dataType : "float",
dataIndx : "remainQnty",
editable : false,
render : function(ui){
var remainQnty = ui.rowData.remainQnty;
var d200Qnty = ui.rowData.d200Qnty;
return remainQnty-d200Qnty;
}
}, {
title : "D200",
width : '5%',
format : '##,##0',
dataType : "float",
dataIndx : "d200Qnty",
editable : false
}, ]
}, {
title : "<msg:message code='label.boxPerQ'/>",
width : '5%',
format : '##,##0',
dataType : "float",
dataIndx : "boxQnty",
editable : false
}, {
title : "<msg:message code='label.supplyBoxQnty'/>",
width : '3%',
format : '##,##0',
dataType : "float",
dataIndx : "supBoxQnty",
editable : false,
align : 'center',
render : function(ui) {
var rowData = ui.rowData;
ui.rowData.supBoxQnty = getSupplyQnty(rowData);
}
},

];

var obj = {
width : '100%',
height : 300,
colModel : colM,
title : '<i class="fa fa-cogs"></i><msg:message code="box.itemList"/>',
loadonce : false,
hwrap : true,
wrap : true,
dataModel : {
data : list
},
flex : {
one : true
},
scrollModel: { autoFit: true },
rowInit : function(ui) {//row처음 셋팅할때
var demandQnty = ui.rowData.demandQnty;
var remainQnty = ui.rowData.remainQnty;
if (demandQnty > remainQnty) {
return {
style : "background: #FFB85A;" //can also return attr (for attributes) and cls (for css classes) properties.
};
}
},
};

gridObj02 = obj;
$("#grid02").pqGrid(obj);
}

5
Help for ParamQuery Pro / It now works resize column
« on: October 02, 2019, 08:25:30 am »
I set this grid, but it dose not resize column width when drag mouse, Is that any property to use this ability?



6
Help for ParamQuery Pro / Re: How can I affect other column ?
« on: September 19, 2019, 06:52:03 am »
I used   formulas , but it just return value text type and it add next to check box
I wonder is how can I select cell and input check box , also It change check value?
Please, I need help

7
Help for ParamQuery Pro / How can I affect other column ?
« on: September 18, 2019, 02:39:29 pm »
If I edit some value and then I change other column value (check box make to checked)
Is that possible to control other column value?
Code: [Select]
      {
                  title: "",                     
                          dataIndx: "check",
                          type: 'checkbox',
                          cbId: 'chk',
                          align : 'center',
                },
                {
                        dataIndx: 'chk',
                        dataType: 'bool',
                        cb: { header: true },
                        hidden: true,
                        editable: function(ui){
                        //Number(list[i].orderQnty) <=(Number(list[i].inQnty)+Number(list[i].deliveryAllQnty))
                        var orderQnty = ui.rowData.orderQnty;
                        var inQnty =   ui.rowData.inQnty;
                        var deliveryAllQnty = ui.rowData.deliveryAllQnty;
                        var result = orderQnty - inQnty - deliveryAllQnty;
                            //to make checkboxes editable selectively.
                        if(result<=0){
                        return false;                       
                        }else{
                        return true;
                        }
                        }
                    },
                { title: "deliveryQnty",/* width : '15%',*/dataIndx: "deliveryQnty",type : 'integer' , 
            editor : {
            attr :'type : number',
            getData : function(ui){
            var value  = ui.$cell.find("input").val();
            if(isNaN(value)){   
                alert("<msg:message code="alert.onylNumber"/>");
                    return 0;
    }
   
                if (value <= 0) {
                alert("<msg:message code="alert.lagerQnty"/>");
                                                        //make check box false unchecked;
                    return 0;
                  }else{
                                                         //make check box true checked;
                  return value;
                  }
            }
            },

8
Help for ParamQuery Pro / User Date Picker
« on: September 17, 2019, 02:45:55 pm »
I use bootstrap date Picker but it dose not work,
If I can use bootstrap date Picker in bootstrap?
Code: [Select]
   
    <script type="text/javascript" src="/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
    <script type="text/javascript" src="/plugins/bootstrap-daterangepicker/moment.min.js"></script>
    <script type="text/javascript" src="/plugins/bootstrap-daterangepicker/daterangepicker.js"></script>

<div class="input-group input-large date-picker input-daterange">
               <input type="text" id="strFromDt" name="fromDt" class="form-control">
        </div>
 

9
Help for ParamQuery Pro / Re: It does not have user guide?
« on: September 17, 2019, 11:10:49 am »
Thank you, but I can not find how to set column ability how to set it?
Then how can I used check box checked fixed and not modify

10
Help for ParamQuery Pro / It does not have user guide?
« on: September 17, 2019, 09:02:04 am »
I using this grid at first time, and I never use grid before, So If it has a user guide more easy guide or tutorial?
Please , answer me

11
Thank you so much, It works , Your solution is good!!!
You're advice make me more better programmer

12
Help for ParamQuery Pro / Grid scroll then modify data reset
« on: September 05, 2019, 01:44:35 pm »
I set column
render  : function(){
 return "<input type = 'text'  />"
}
and i insert string then i using grid scroll and it disappear table then I see again it , it return nothing
but if I using scroll bar it return origin value

Why It reset? and can I prevent this?

and also how to I get Data in javascript
Code: [Select]
    var colM = [
                { title: "<msg:message code="label.checkBox"/>",/* width : '10%', */ dataIndx: "paymentNo",align:"center",editable : false
                ,render : function(ui){
                var qrcodeData = ui.rowData.qrcode;
                var rowIndx = ui.rowIndx;
                var paymentNo = ui.rowData.paymentNo;
                if(qrcodeData == '' || qrcodeData == null){   
            var inHtml="<div><input type='checkbox'  class=\"checkPrintYN\"  name = \"deliveryItemList["+rowIndx+"].printYN\" value=\"Y\" />";
            inHtml+="<input type='hidden' name = \"deliveryItemList["+rowIndx+"].paymentNo\" value=\""+paymentNo+"\"/></div>";
                return inHtml;
                }else{
                return '';
                }
                }
                },
                { title: "<msg:message code="label.payNo"/>",/* width : '10%', */ dataIndx: "paymentNo" ,editable : false},
                { title: "<msg:message code="label.confirmDt"/>",/* width : '15%',*/dataIndx: "confirmDt",editable : false },
                { title: "<msg:message code="label.confirmQnty"/>",/*  width : '10%', */format: '##,###',
                    dataType: "integer", dataIndx: "confirmQnty",editable : false
                },
                { title: "<msg:message code="label.paymentDt"/>",/* width : '15%', */dataIndx: "paymentDt" ,editable : false },
                { title: "<msg:message code="label.paymentAmount"/>",/* width : '10%', */format: '##,###',
                    dataType: "integer", dataIndx: "paymentAmount",editable : false
                },
                { title: "<msg:message code="label.processStatus"/>",/* width : '10%', */  dataIndx: "processStatus",editable  : false },
                { title: "<msg:message code="label.orderNo"/>",/* width : '10%',*/ dataIndx: "orderNo",editable  : false },
                { title: "<msg:message code="label.orderDt"/>",/* width : '20%', */ dataIndx: "orderDt",editable  : false },
                { title: "<msg:message code="label.receivingNo"/>",/* width : '20%', */ dataIndx: "arrivalNo" ,editable  : false},
                { title: "<msg:message code="label.deliveryDt"/>",/* width : '20%', */ dataIndx: "deliveryDt" ,editable  : false},
                { title: "<msg:message code="label.receivingDt"/>",/* width : '20%', */ dataIndx: "inDt" ,editable  : false},
                { title: "<msg:message code="label.partNo"/>",/* width : '10%',*/ dataIndx: "itemCd" ,editable  : false},
                { title: "<msg:message code="label.partNm"/>",/* width : '20%', */ dataIndx: "itemNm" ,editable  : false},
                { title: "<msg:message code="label.unt"/>",/* width : '5%', */ dataIndx: "orderUnit" ,editable  : false},
                { title: "<msg:message code="label.subcontract"/>",/* width : '5%', */ dataIndx: "smTypeNm" ,editable  : false},
                { title: "<msg:message code="label.orderQnty"/>",/* width : '10%', */  format: '##,###.00',
                    dataType: "float", dataIndx: "orderQnty",editable  : false
                },
                { title: "<msg:message code="label.boxperQnty"/>",/* width : '10%', */  format: '##,###.00',
                    dataType: "float", dataIndx: "boxQnty",editable  : false
                },
                { title: "<msg:message code="label.lotNo"/>",/* width : '5%', */ dataIndx: "lotNo" ,editable  : false},
                { title: "<msg:message code="label.deliveryQnty"/>",/* width : '10%', */  format: '##,###.00',
                    dataType: "float", dataIndx: "deliveryQnty",editable  : false
                },
                { title: "<msg:message code="label.inQnty"/>",/* width : '10%',  */ format: '##,###.00',
                    dataType: "float", dataIndx: "inQnty",editable  : false
                },
                { title: "<msg:message code="label.RMregQnty"/>",/* width : '10%', */  format: '##,###.00',
                    dataType: "float", dataIndx: "rmQnty",editable  : false
                },
                { title: "<msg:message code="label.ngAmount"/>",/* width : '10%', */  format: '##,###.00',
                    dataType: "float", dataIndx: "ngAmount",editable  : false
                },
                { title: "<msg:message code="btn.print"/>",/* width : '5%', */ dataIndx: "qrcode",editable  : false,
                render : function(ui){
                var qrcodeData = ui.rowData.qrcode;
                if(qrcodeData != '' && qrcodeData != null){
                var inHtml="<div><a class=\"btn btn-xs blue\" style = \"height: 20px;padding-top: 2px;\" href=\"#\" onclick=\'fprint(\""+qrcodeData+"\")\'>";
        inHtml+="Print</a></div>";
                return inHtml;
                }
                }
                }          

    ];
 
    var obj = {
    width : '100%',
    height : 450,
    colModel: colM,
    title : '<i class="fa fa-cogs"></i><msg:message code="box.itemList"/>',
    loadonce : true,
        hwrap: true,
        wrap: true,
        mergeCells : mc,
        dataModel : {data:list},
        flex: { one: true },
    };
   
    $("#grid01").pqGrid(obj);

13
I merged Cell then my inner object like button,check box is located cell top.
I set column style align : center then it moved center, but It still vertical top.
So, I set css like this
.pq-merge-cell {
padding-top : 6vh;
}
but it make cell ugly and It is not same location what height difference;
So If you have good method to set vertical middle
please answer me

Pages: [1]