// data.DATASET.Table1.Column 경로의 ColoumnName 데이터 저장
var columns= Dispatching.column(data.DATASET.Table1.Columns,"ColumnName","Alias");
// 동적 컬럼 할당을 위함
if (gridOptions.colModel == null) {
var colModel = [];
$.each(columns, function (i, row) {
colModel[i] = {};
col = colModel[i];
col.name = row;
col.editable = true;
if (row == "QUERYSTRING") {
col.edittype = "textarea";
}
//col.width = "100%"
});
gridOptions.colModel = colModel;
}
var rowData=Dispatching.rowsSet(data.DATASET.Table1.Rows,columns); // data.DATASET.Table1.Rows 경로의 컬럼명을 변경
gridOptions["data"] = rowData; // 바인딩
gridOptions["datatype"] = "local";
gridOptions["beforeSelectRow"] = null;
gridOptions["ondblClickRow"] = null;
commonUtil.grid.set(grid2Table, gridOptions, null, callback);
console.log(gridOptions);
return;
}
commonUtil.grid.set(grid2Table, gridOptions, options, callback);
},
column: function (data, columnName, alias) {
var result = {};
$.each(data, function (key, value) {
result[value[alias]] = value[columnName];
});
return result;
},
rowsSet: function (rows, column) {
var results = [];
$.each(rows, function (i, row) {
result = {};
$.each(row, function (key, value) {
result[column[key]] = value;
});
results.push(result);
});
return results;