ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: SHIN WOOCHUL 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?
-
you can't create combo box or select list in a grid cell but you can create it as an editor.
Example: ShipCountry, Books, Ship Via columns in this demo: https://paramquery.com/pro/demos/editing_custom
-
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?
-
I apply this code but it happen error that it does not have label,
Please share a jsfiddle.
so I wonder how to set data arrayList into this select box editor
select box editor options can be any one of the mentioned format:
https://paramquery.com/pro/api#option-column-editor
also Is It possible to setting like <opiton value = 'value'>name</option> like this structure?
No, please don't use this format.