0
我試圖讓行只能選擇$treeLevel
。 控制檯返回ReferenceError: uiGridConstants is not defined
。我不得不承認,我不完全理解uiGridConstants代表什麼。enableSelection和uiGridConstants
這裏是我的代碼:
onRegisterApi: function (gridApi) {
this.gridApiBatches = gridApi;
console.info(gridApi);
gridApi.grid.options.enableSelection = function (row) {
if (row.entity.$treeLevel != 3) {
return false;
} else {
return true;
}
};
gridApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
謝謝!我的代碼不起作用,但uiGridConstants被識別爲:-) –