Commit Graph

9 Commits

Author SHA1 Message Date
Atanas Korchev
609622692e 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:55 +03:00
yordanov
8892c9fd2f Update layouts in Spreadsheet Dialogs 2026-06-15 18:45:18 +03:00
yordanov
905efc6388 Update spreadsheet popup and dialog styles 2026-06-15 18:45:14 +03:00
Atanas Korchev
02310a9ba4 Rename DataValidationRule.Prompt to InputMessage and PromptTitle to InputTitle 2026-06-15 18:45:06 +03:00
Atanas Korchev
43647e292a Add localization service for RadzenSpreadsheet
Introduce a generic localization infrastructure that ships built-in English
defaults via .resx and allows user overrides through a public ILocalizer
interface. The service is designed to work across all Radzen components.

- Add ILocalizer interface for custom translation overrides
- Add internal Localizer class with fallback chain: custom → .resx → key
- Add RadzenStrings.resx with ~120 spreadsheet string keys
- Add UICulture/DefaultUICulture cascading parameter to RadzenComponent
- Add ISpreadsheet.Localize() for sub-component access
- Replace all hardcoded strings in spreadsheet tools, dialogs, and menus
- Register Localizer in AddRadzenComponents() with graceful fallback
- Works with zero configuration; user overrides are optional
2026-06-15 18:45:06 +03:00
Atanas Korchev
e121c6ed3b Replace magic strings with enums in dialog components
DataValidationDialog now uses DataValidationType, DataValidationOperator,
and DataValidationErrorStyle directly instead of string intermediaries
that were converted in OnOk().

ConditionalFormatDialog now uses a new ConditionalFormatRuleType enum
instead of strings like "greater", "less", "between".
2026-06-15 18:45:04 +03:00
Atanas Korchev
d99fdd3fcc Rename namespace to Radzen.Documents.Spreadsheet for document layer
137 document-layer files now use namespace Radzen.Documents.Spreadsheet.
26 UI-layer files keep Radzen.Blazor.Spreadsheet with using added.
Test files add using Radzen.Documents.Spreadsheet.
Sheet class renamed to Worksheet to match industry conventions.
2026-06-15 18:45:02 +03:00
Atanas Korchev
888b5311e8 Close data validation gaps vs Syncfusion/Telerik.
Add warning/information error styles that allow entry after prompt,
input prompt display on cell selection, custom formula validation
with relative references, list validation from cell range references,
and date/time pickers in the validation dialog. Update the dialog to
expose error style, input prompt fields, and the Custom validation type.
2026-06-15 18:45:01 +03:00
Atanas Korchev
ea1a32371c Add data validation UI to RadzenSpreadsheet.
- Add DataValidationRule with support for WholeNumber, Decimal, List, Date,
  Time, and TextLength validation types with all comparison operators
- Rename ICellVaidator to ICellValidator (fix typo)
- Extend ValidationStore with Remove, GetValidators, GetValidatorsForCell,
  RemoveAll, and Ranges
- Add DataValidationCommand and ClearValidationCommand with undo/redo support
- Add Data Validation dialog and toolbar split button in Data tab
- Add red triangle error indicator (::after pseudo-element) and tooltip on
  invalid cells
- Add list validation dropdown popup with chevron button
- Add XLSX import/export for dataValidation elements
- Add validation CSS to premium themes (material3, fluent)
- Add 40 tests covering validators, commands, undo/redo, and XLSX round-trips
2026-06-15 18:45:01 +03:00