2026-06-09 14:20:02 +03:00
@namespace Radzen.Blazor
2026-03-25 11:03:06 +02:00
@using Radzen.Blazor
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
@using Radzen.Blazor.Spreadsheet
2026-06-09 14:20:02 +03:00
@using Radzen.Blazor.Spreadsheet.Tools
2026-03-22 13:22:34 +02:00
@using Radzen.Documents.Spreadsheet
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
@inject DialogService DialogService
2026-06-17 18:26:52 +03:00
@inherits RadzenSpreadsheetToolBase
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
Add screen-reader and keyboard accessibility to RadzenSpreadsheet
Make the spreadsheet usable with a screen reader and fully operable by keyboard,
keeping the virtualized cell hot path perf-neutral, with no breaking change
beyond the intended one (the toolbar becomes Tab-navigable).
- role="application" on the root + an isolated, self-rendering live-region
announcer (RadzenLiveRegion + SpreadsheetAccessibility) that speaks the active
cell (address, value, frozen-row header, position, state), selection size, and
structural actions (sort/filter/insert) without re-rendering the grid.
- Contextual keyboard gate: Tab moves the active cell in the grid but stays native
in the chrome; F6/Shift+F6 cycle regions (ribbon/toolbar/formula bar/grid/sheet
tabs) - the WCAG 2.1.2 escape. Full nav set added: Home/End, Ctrl+Home/End,
Ctrl+A, Ctrl+Arrow edge-jump, Ctrl+Space/Shift+Space, PageUp/Down, Ctrl+D/R fill;
RTL arrow swap; IME/"Home types H" guard; F2, Ctrl+Y; Shift+F10 context menu.
- Accessible names on every toolbar tool + SelectBar item (localized via nameof);
inner editor gets role=textbox + a mode-specific label via InputAttributes.
- Image/chart keyboard layer (Ctrl+Alt+5 select/cycle, arrows move, Size dialog
resize), undoable column/row resize, Alt+/ shortcut-help dialog, dialog focus
restore.
- 19 new bUnit/xUnit tests; full suite green; verified live in Chrome.
2026-06-27 23:18:15 +03:00
<RadzenSplitButton ButtonAriaLabel=@(Spreadsheet?.Localize(nameof(RadzenStrings.Spreadsheet_ConditionalFormatTool))) OpenAriaLabel=@(Spreadsheet?.Localize(nameof(RadzenStrings.Spreadsheet_ConditionalFormatTool))) title=@(Spreadsheet?.Localize(nameof(RadzenStrings.Spreadsheet_ConditionalFormatTool))) Click=@OnClickAsync Icon="format_color_fill" Text=@(Spreadsheet?.Localize(nameof(RadzenStrings.Spreadsheet_Conditional)) ?? "Conditional") Disabled=@IsDisabled Variant="Variant.Outlined" ButtonStyle="ButtonStyle.Base" Size="ButtonSize.Small">
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
<ChildContent>
2026-03-25 11:03:06 +02:00
<RadzenSplitButtonItem Text=@(Spreadsheet?.Localize(nameof(RadzenStrings.Spreadsheet_GreaterThanMenu)) ?? "Greater Than...") Value="greater" />
<RadzenSplitButtonItem Text=@(Spreadsheet?.Localize(nameof(RadzenStrings.Spreadsheet_LessThanMenu)) ?? "Less Than...") Value="less" />
<RadzenSplitButtonItem Text=@(Spreadsheet?.Localize(nameof(RadzenStrings.Spreadsheet_BetweenMenu)) ?? "Between...") Value="between" />
<RadzenSplitButtonItem Text=@(Spreadsheet?.Localize(nameof(RadzenStrings.Spreadsheet_EqualToMenu)) ?? "Equal To...") Value="equal" />
<RadzenSplitButtonItem Text=@(Spreadsheet?.Localize(nameof(RadzenStrings.Spreadsheet_TextContainsMenu)) ?? "Text Contains...") Value="text" />
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
</ChildContent>
</RadzenSplitButton>
@code {
2026-06-17 18:26:52 +03:00
protected override SpreadsheetFeature? Feature => SpreadsheetFeature.ConditionalFormatting;
2026-06-17 18:08:12 +03:00
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
private async Task OnClickAsync(RadzenSplitButtonItem? item)
{
2026-03-22 20:52:02 +02:00
if (Worksheet is null || Worksheet.Selection.Cell == CellRef.Invalid)
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
{
return;
}
2026-03-22 16:21:45 +02:00
var ruleType = item?.Value switch
{
"less" => ConditionalFormatRuleType.LessThan,
"between" => ConditionalFormatRuleType.Between,
"equal" => ConditionalFormatRuleType.EqualTo,
"text" => ConditionalFormatRuleType.TextContains,
_ => ConditionalFormatRuleType.GreaterThan
};
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
2026-03-25 11:03:06 +02:00
var result = await DialogService.OpenAsync<ConditionalFormatDialog>(Spreadsheet?.Localize(nameof(RadzenStrings.Spreadsheet_ConditionalFormattingTitle)) ?? "Conditional Formatting",
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
new Dictionary<string, object?>
{
Add culture-aware editing, display, and formula entry to RadzenSpreadsheet
The spreadsheet engine parsed typed input with the invariant culture while
displaying values with the current culture, breaking the edit round-trip on
non-en-US hosts and making comma-decimal entry (10,50) impossible.
Workbook gains a Culture property (defaults to CurrentCulture) which the
component stamps from its inherited Culture parameter. It drives:
- Cell input parsing (CellData type inference), including day-month date
handling for cultures where the group and date separators collide (de-DE)
- Edit text and display rendering (GetValue, GetValueAsString, GetDisplayText)
- Number format rendering - format codes stay canonical invariant tokens while
separators, month names, and AM/PM designators follow the culture
- Formula entry and display via the new FormulaLocalizer (Excel FormulaLocal
semantics: ';' argument separators and ',' decimals in comma-decimal
cultures, lenient comma acceptance where unambiguous, canonical invariant
storage)
- Dialog input (data validation, conditional format, filter) via shared
conversion helpers on SpreadsheetDialogBase
XLSX and CSV files read and write canonical invariant values regardless of
the workbook culture, including autofit column widths. Malformed formulas now
surface as error trees instead of an unhandled lexer exception. Number format
parsing is cached (hard-bounded) since CellView reparsed per render.
Includes localization demos for the Spreadsheet and Document Processing
sections and culture test suites.
Note: headless code on non-en-US hosts now parses string values with the
host culture; set Workbook.Culture explicitly (or to InvariantCulture) for
host-independent processing.
2026-07-08 14:54:40 +03:00
{ "RuleType", ruleType },
{ "Culture", Worksheet.Culture }
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
});
2026-05-19 17:07:47 +03:00
if (result is ConditionalFormatBase rule && Spreadsheet is not null)
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
{
2026-03-22 13:24:49 +02:00
var command = new ConditionalFormatCommand(Worksheet, Worksheet.Selection.Range, rule);
2026-05-19 17:07:47 +03:00
await Spreadsheet.ExecuteAsync(command);
Add missing formatting features to RadzenSpreadsheet.
Add strikethrough, font family, font size, text wrap, merge cells UI,
cell borders, hyperlinks, number format colors, and conditional
formatting UI. Includes toolbar tools, undo/redo commands, XLSX
import/export, and 45 new tests.
2026-03-19 17:20:29 +02:00
}
}
}