{"record":{"id":"a722e45beb8c71f6","repo":"JetBrains/intellij-community","slug":"operation-is-not-permitted-for-nested-grids","errorCode":null,"errorMessage":"Operation is not permitted for nested grids.","messagePattern":"Operation is not permitted for nested grids\\.","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"grid/core-impl/src/datagrid/NestedTablesDataGridModel.java","lineNumber":106,"sourceCode":"  @Override\n  public boolean hasListeners() {\n    return myModel.hasListeners();\n  }\n\n  @Override\n  public @Nullable Object getValueAt(ModelIndex<GridRow> rowIdx, ModelIndex<GridColumn> columnIdx) {\n    if (isTopLevelGrid()) return myModel.getValueAt(rowIdx, columnIdx);\n    if (!isValidRowIdx(rowIdx) || !isValidColumnIdx(columnIdx)) return null;\n\n    return myCurrentlySelectedNestedTable.getValueAt(rowIdx.asInteger(), columnIdx.asInteger());\n  }\n\n  @Override\n  public boolean allValuesEqualTo(@NotNull ModelIndexSet<GridRow> rowIndices,\n                                  @NotNull ModelIndexSet<GridColumn> columnIndices,\n                                  @Nullable Object what) {\n    if (!isTopLevelGrid()) {\n      throw new IllegalStateException(\"Operation is not permitted for nested grids.\");\n    }\n    return myModel.allValuesEqualTo(rowIndices, columnIndices, what);\n  }\n\n  @Override\n  public @Nullable GridRow getRow(@NotNull ModelIndex<GridRow> row) {\n    if (isTopLevelGrid()) return myModel.getRow(row);\n    return getRow(row.asInteger());\n  }\n\n  @Override\n  public @Nullable GridColumn getColumn(@NotNull ModelIndex<GridColumn> column) {\n    if (isTopLevelGrid()) return myModel.getColumn(column);\n    return new NestedTableColumn(column.asInteger(), myCurrentlySelectedNestedTable);\n  }\n\n  @Override\n  public @NotNull JBIterable<GridColumn> getColumnsAsIterable() {","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/grid/core-impl/src/datagrid/NestedTablesDataGridModel.java#L88-L124","documentation":"NestedTablesDataGridModel.allValuesEqualTo throws IllegalStateException when called while a nested (non-top-level) grid is selected. Bulk predicates over model index sets only make sense on the top-level model; when the user has drilled into a nested table, the operation is deliberately blocked.","triggerScenarios":"Invoking allValuesEqualTo(rowIndices, columnIndices, what) on the wrapper while myPathToSelectedNestedTable is non-empty (a nested table is currently selected).","commonSituations":"Bulk-edit or find/replace tooling that runs regardless of drill-down state; actions not disabled when the selection moves into a nested grid.","solutions":["Check isTopLevelGrid() (or that no nested table is selected) before calling allValuesEqualTo.","Disable or re-scope bulk operations to the selected nested table when not top-level.","Call the underlying model directly if the operation must run on top-level data while a nested view is open."],"exampleFix":"// before\nboolean all = model.allValuesEqualTo(rows, cols, value);\n\n// after\nif (model.isTopLevelGrid()) {\n  boolean all = model.allValuesEqualTo(rows, cols, value);\n}","handlingStrategy":"validation","validationCode":"if (model.isTopLevelGrid()) {\n  boolean all = model.allValuesEqualTo(rows, cols, what);\n}","typeGuard":"static boolean supportsBulkOps(NestedTablesDataGridModel m) { return m.isTopLevelGrid(); }","tryCatchPattern":null,"preventionTips":["Disable bulk operations in the UI while a nested grid is selected.","Reset nested navigation before running automated bulk passes."],"tags":["datagrid","nested-tables","unsupported-operation","state-error"],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}