CanopyX.Html
0.1.0
See the version list below for details.
dotnet add package CanopyX.Html --version 0.1.0
NuGet\Install-Package CanopyX.Html -Version 0.1.0
<PackageReference Include="CanopyX.Html" Version="0.1.0" />
<PackageVersion Include="CanopyX.Html" Version="0.1.0" />
<PackageReference Include="CanopyX.Html" />
paket add CanopyX.Html --version 0.1.0
#r "nuget: CanopyX.Html, 0.1.0"
#:package CanopyX.Html@0.1.0
#addin nuget:?package=CanopyX.Html&version=0.1.0
#tool nuget:?package=CanopyX.Html&version=0.1.0
CanopyX - Large Interactive Data Views for .NET
CanopyX renders large interactive data views from .NET without runtime dependencies. Its tree grid supports paged lazy children, path search and details. Its flat data grid queries typed records before paging, with stable identities, multi-column sorting, filters, saved views and bounded virtual rows. Both views provide keyboard navigation and stable-ID selection. Pages work as a single file or against a host data source; trees also support sidecar bundles opened from a file share.
Install
dotnet add package CanopyX.Html
Both packages target net472, netstandard2.0, net8.0, and net10.0.
| Package | Purpose |
|---|---|
CanopyX |
View definitions, the canopyx/2 data protocol, the bundle writer, and the static fallback renderer. No runtime dependencies. |
CanopyX.Html |
The tree and flat-grid browser runtimes, data sources and theme CSS, plus the API that writes pages, fragments, tree bundles and asset files. |
Quick Start
using CanopyX;
using CanopyX.Html;
var view = new CanopyTreeView("files", "File shares");
view.Columns.Add(new CanopyColumn("name", "Name") { Sizing = CanopyColumnSizing.Preferred(320), Sortable = true });
view.Columns.Add(new CanopyColumn("size", "Size") { Kind = CanopyColumnKind.Number, Sortable = true });
var projects = new CanopyNode("projects", @"\\files\projects");
projects.Cells["size"] = 5_368_709_120;
projects.Children.Add(new CanopyNode("projects/plans", "plans"));
view.Roots.Add(projects);
view.SaveHtmlPage("files.html"); // single file with inline data
view.SaveHtmlBundle("report"); // sidecar bundle for large trees
CanopyStaticHtml.Render(view) in CanopyX.Rendering returns a script-free outline table for email, print, and Word.
Flat Data Grid
var inventory = new CanopyDataGridView("inventory", "Inventory");
inventory.Columns.Add(new CanopyColumn("name", "Name") { Sortable = true });
inventory.Columns.Add(new CanopyColumn("size", "Size") { Kind = CanopyColumnKind.Number, Sortable = true });
var record = new CanopyGridRow("record-17");
record.Cells["name"] = "Archive";
record.Cells["size"] = new CanopyCell(2048L) { Text = "2 KiB" };
inventory.Rows.Add(record);
inventory.SaveHtmlPage("inventory.html");
Raw values drive filtering and sorting; display text remains presentation. The toolbar provides column visibility and ordering, resizing, typed filters and resettable saved views. CSV exports and row copying distinguish filtered results, selected records and all results, independently of rows on screen. Large Office exports and record drawers call host hooks. CanopyStaticHtml.RenderGrid(inventory) supplies a script-free fallback.
A sortable text column's Ordering policy adds deterministic ordinal, folded and natural text ordering, plus host-defined category order; enable CanopyDataGridView.Reporting for these capabilities. CanopyGridOrdering supplies the same comparer to host queries, and the page writer selects the reporting runtime. Represent exact large identifiers and decimals as text; JSON numbers use binary64 precision and numeric magnitudes are limited to the safe-integer range.
The reporting filter editor provides inclusive numeric/date ranges, category suggestions and translated boolean choices. Set Reporting.HeaderFilters = true to open the editor from a column header. Ranges use the existing typed predicates; filtering and exports apply to all accepted results before visible paging. Reporting.FilterGroups = true adds nested AND/OR condition groups over those predicates, with atomic Apply validation and saved-query restoration. Inclusive ranges within OR remain a conjunction. Expressions are bounded to eight levels, 64 groups and 64 total predicates. Add declared column IDs to Reporting.FacetColumns for bounded raw values and counts from the complete accepted query. Inline sources compute them; hosted sources provide an explicit facet hook. Choosing a value edits the draft until Apply, with an option to exclude that column's current conditions from the counts.
CanopyColumn.Presenter adds safe links, decorative icons with text alternatives, native progress, translated boolean values, compact lists and complete-text dialogs. For example, inventory.GetColumn("notes").Presenter = CanopyGridPresenter.LongText() expands notes without changing virtual row height. Query and export values remain independent of the display; explicit host renderers take precedence.
Reporting grids support direct pointer/keyboard header moves, per-column minimum/maximum widths and optional flex sizing. Auto-fit explicitly samples up to 200 loaded accepted-query records and applies a bounded width estimate. Manual sizing disables flex until reset or saved-state restoration; column identities continue to govern sorting, visibility and export order.
Reporting layouts also support left/right pins and responsive retention priorities. Pins suspend when space is needed for the scrolling center. Temporary responsive hiding preserves saved visibility intent, full-record details, search and default export columns; the column chooser distinguishes these temporary decisions from explicit user hiding.
Set an explicit StateKey and Reporting.ViewStorage = CanopyGridViewStorage.Local for preferences that survive browser sessions. Saved views offer rename, delete and default choices; reset restores the definition and keeps named views. JavaScript host storage hooks govern remote preference delivery, and shareable state strips searches, filters, selected identities and dataset positions. Preferences never authorize record access.
Reporting grids group records by a declared column and show complete-query aggregates. Group keys lead sorting, followed by user sorts and stable row IDs. Collapsing a group changes presentation; paging, selection and exports still count records. Inline sources calculate summaries, while hosted sources return revisioned summary metadata through an explicit hook.
Exports capture the accepted query, revision, scope and column order with filename, locale and time-zone metadata. Captured cells contain both raw value and display text; reporting captures also resolve semantic tones and links and identify unsupported presentation. The export hook receives the prepared capture, whose rows({ signal }) enumerates independent serial windows. Progress and cancellation belong to that operation. materializeExport returns a bounded immutable snapshot without truncation; print passes the complete snapshot to a host renderer. Hosts supply large Office and print generation through the export hook. Standalone CSV/copy remains available without an HTTP host, and Office generation adds no dependency to CanopyX.
The pre-1.0 C# API uses CanopyTreeView, CanopyDataGridView, CanopyGridSource factories and CanopyColumnSizing. Presenters and ordering belong to the column. CanopyGridMapper<T> maps host records through typed selectors, and CanopyStaticHtml.RenderGrid(view, cursorPage) renders an accepted cursor snapshot even when totals are unknown. See the repository README for the breaking migration notes.
Links
- Repository: https://github.com/EvotecIT/CanopyX
- Issues: https://github.com/EvotecIT/CanopyX/issues
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CanopyX.Html:
| Package | Downloads |
|---|---|
|
HtmlForgeX.CanopyX
Optional CanopyX integration for HtmlForgeX. Hosts tree grids, flat data grids and materialized report explorers, with document-managed assets, the Evotec theme and script-free grid snapshots. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Virtual tree and flat grids, typed query controls, saved views, scoped CSV and clipboard exports, host-governed Office exports and details, and page, fragment, bundle, and asset writers.