{"record":{"id":"fc3cd353432c341b","repo":"spectreconsole/spectre.console","slug":"column-spanning-is-not-supported-in-table-footer-r","errorCode":null,"errorMessage":"Column spanning is not supported in table footer rows.","messagePattern":"Column spanning is not supported in table footer rows\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Spectre.Console/Widgets/Table/TableColumn.cs","lineNumber":38,"sourceCode":"            {\n                throw new InvalidOperationException(\"Column spanning is not supported in table header rows.\");\n            }\n\n            _header = value ?? throw new ArgumentNullException(nameof(value));\n        }\n    }\n\n    /// <summary>\n    /// Gets or sets the column footer.\n    /// </summary>\n    public IRenderable? Footer\n    {\n        get => _footer;\n        set\n        {\n            if (value is TableCell cell && cell.ColumnSpan > 1)\n            {\n                throw new InvalidOperationException(\"Column spanning is not supported in table footer rows.\");\n            }\n\n            _footer = value;\n        }\n    }\n\n    /// <summary>\n    /// Gets or sets the width of the column.\n    /// If <c>null</c>, the column will adapt to its contents.\n    /// </summary>\n    public int? Width { get; set; }\n\n    /// <summary>\n    /// Gets or sets the padding of the column.\n    /// Vertical padding (top and bottom) is ignored.\n    /// </summary>\n    public Padding? Padding { get; set; }\n","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/spectreconsole/spectre.console/blob/0acc92fada6c42f13984e79c2b5f3d993bdfb099/src/Spectre.Console/Widgets/Table/TableColumn.cs#L20-L56","documentation":"The TableColumn.Footer setter, like Header, forbids column-spanning cells. Assigning a TableCell whose ColumnSpan > 1 to Footer throws InvalidOperationException. Spanning is permitted only in body rows; footer layout cannot merge columns.","triggerScenarios":"Setting column.Footer = new TableCell(text).Span(2); reusing a spanning body TableCell as a footer; constructing footers via a shared cell factory that applies spans.","commonSituations":"Wanting a 'Total' footer that spans several columns (unsupported); reusing a body TableCell for the footer row; assuming Footer follows the same rules as body rows.","solutions":["Assign a plain renderable (new Markup(text)) to Footer, not a spanned TableCell.","Create a separate non-spanning cell instance for the footer rather than reusing a body cell.","If a merged footer is required, render it as a separate table/caption outside the footer row."],"exampleFix":"// before\ncolumn.Footer = new TableCell(\"Total\").Span(2);\n\n// after\ncolumn.Footer = new Markup(\"Total\");","handlingStrategy":"validation","validationCode":"var footerCell = value as TableCell;\nif (footerCell is not null && footerCell.ColumnSpan > 1)\n    throw new InvalidOperationException(\"Footers cannot span columns.\");\ncolumn.Footer = value;","typeGuard":"static bool IsSafeFooter(IRenderable r) => r is not TableCell tc || tc.ColumnSpan <= 1;","tryCatchPattern":null,"preventionTips":["Assign plain Markup to footers, never spanned TableCells.","Build footer cells from a span-free source.","Do not reuse body cells as footers."],"tags":["table","footer","column-span","invalid-operation"],"backgroundTag":null,"analyzedSha":"0acc92fada6c42f13984e79c2b5f3d993bdfb099","analyzedAt":"2026-08-13T18:27:21.983Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}