읽기 전용 컬럼
DataColumn의 readOnly 속성을 true로 하거나, editable을 false로 설정하면 해당 컬럼의 셀들에서는 사용자가 입력을 할 수 없게 됩니다. 또한 DataCellStyle의 편집 속성을 지정해서 특정 데이터 셀을 read-only로 지정할 수도 있습니다. Read-Only 컬럼은 그리드 edit 옵션의 skipReadOnly가 true로 지정되면 편집 중에 방향키나 탭키로 이동할 때 건너뛰게 됩니다.
pivot, grid, 피벗, 필터, filter
pivot, export
pivot, style, callback, styleCallback
pivot, value, getCellValue
pivot, pivotFields, getPivotFields
DataColumn의 readOnly 속성을 true로 하거나, editable을 false로 설정하면 해당 컬럼의 셀들에서는 사용자가 입력을 할 수 없게 됩니다. 또한 DataCellStyle의 편집 속성을 지정해서 특정 데이터 셀을 read-only로 지정할 수도 있습니다. Read-Only 컬럼은 그리드 edit 옵션의 skipReadOnly가 true로 지정되면 편집 중에 방향키나 탭키로 이동할 때 건너뛰게 됩니다.
EditOptions.skipReadOnly를 true로 지정하면 편집 중에 방향키나 탭키로 이동할 때 건너뛰게 됩니다.
skipReadOnly 설정
1
2
3
gridView.setEditOptions({
skipReadOnly: $("#chkSkipReadOnly").is(":checked")
});
DataColumn의 readOnly 속성을 true로 하거나, editable을 false로 설정하면 해당 컬럼의 셀들에서는 사용자가 입력을 할 수 없게 됩니다.
컬럼선택
readOnly 적용
1
2
3
4
var column = $("#columnList").val();
if (column) {
gridView.setColumnProperty(column, "readOnly", $("#chkReadOnly").is(":checked"));
}
editable 적용
1
2
3
4
var column = $("#columnList").val();
if (column) {
gridView.setColumnProperty(column, "editable", $("#chkEditable").is(":checked"));
}
DataCellStyle의 편집 속성을 지정해서 특정 데이터셀을 read-only로 지정할 수 있습니다.
** CellStyle 정의
1
2
3
4
5
6
7
8
9
10
11
12
13
gridView.addCellStyle("style01", {
"foreground": "#ffffffff",
"background": "#ff333333",
"fontSize": 13,
"fontBold": true,
"editable": false
});
gridView.addCellStyle("style02", {
"foreground": "#ff000000",
"background": "#ffcccccc",
"fontSize": 13,
"readOnly": true
});
1
2
gridView.setCellStyles([3, 4, 5], ["CompanyName"], "style01");
gridView.setFocus();
1
2
gridView.setCellStyles([6, 7, 8], ["CustomerID"], "style02");
gridView.setFocus();
1
2
gridView.clearCellStyles();
gridView.setFocus();