/********************************************************************************** * 함수명 : gfn_getCboValue * 설명 : 콤보에 존재하는 values값들을 return * argument : * return Type : String **********************************************************************************/
function gfn_getCboValue(obj) {
if(!obj instanceof Combo) return;
var ds = obj.innerdataset;
if ( gfn_GetCompType(ds) != "Dataset"){
ds = eval(ds);
}
if (obj.index < 0) obj.index = 0;
var cd = obj.codecolumn;
var nm = obj.datacolumn;
var rtnCd = "";
if (ds.getColumn(obj.index, nm) == "선택" || ds.getColumn(obj.index, nm) == "전체") {
for (var i=1; i<ds.rowcount; i++) {
if (i==1) {
rtnCd += "'" + ds.getColumn(i, "CD") + "'";
} else {
rtnCd += ",'" + ds.getColumn(i, "CD") + "'";
}
}
} else {
rtnCd = "'" + ds.getColumn(obj.index, cd) + "'";
}
return rtnCd;
} |