Implement Org Chart/HR Portal sample with IgbTreeGrid and Fluent Light theme#11
Implement Org Chart/HR Portal sample with IgbTreeGrid and Fluent Light theme#11
Conversation
…ta, and Fluent theme Co-authored-by: dkamburov <1182001+dkamburov@users.noreply.github.com>
| OnDataChanged?.Invoke(); | ||
| } | ||
|
|
||
| private static List<EmployeeData> GetOrgChartData() => new() |
There was a problem hiding this comment.
@copilot No, I want to use the dynamic data from the endpoint, revert this static data.
There was a problem hiding this comment.
Done in commit a426cdf. Reverted HRService to use HttpClient fetching from https://www.infragistics.com/grid-examples-data/data/hr/hr.json. Also restored AddHttpClient<HRService>() in both Program.cs files and added back the Manager field to EmployeeData (which maps to the "Manager" JSON property from the endpoint). The IgbTreeGrid remains configured with PrimaryKey="Id" and ForeignKey="ParentId" to support hierarchical display when the endpoint data includes ParentID values.
…atic embedded data Co-authored-by: dkamburov <1182001+dkamburov@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| <div class="mt-3"> | ||
| <small class="text-muted"> | ||
| <i class="bi bi-info-circle"></i> Data updates every 3 seconds to simulate live HR data | ||
| <i class="bi bi-info-circle"></i> Performance scores update every 3 seconds to simulate live HR data |
There was a problem hiding this comment.
@copilot remove this, shouldn't be part of the sample
There was a problem hiding this comment.
Removed in commit f49a6ea. Cleaned up the info footer div and the auto-update timer logic entirely.
| <IgbColumn Field="Location" Header="Location" Width="10%" MinWidth="90px"></IgbColumn> | ||
| <IgbColumn Field="Performance" Header="Performance" DataType="GridColumnDataType.Number" Width="8%" MinWidth="95px"></IgbColumn> | ||
| </IgbGrid> | ||
| <IgbTreeGrid Data="HRService.Data" |
There was a problem hiding this comment.
Added in commit 2f39cd1. The toolbar now matches the WebComponents design reference with:
- Title: "HR Portal"
- Actions: Column Hiding, Column Pinning, Excel Exporter, Advanced Filtering
- Conditional "Clear Sort" button — appears only when sorting is active, calls
ClearSortAsync()when clicked - Paginator with 20 rows per page
…talComponent Co-authored-by: dkamburov <1182001+dkamburov@users.noreply.github.com>
…ltering, and paginator to HRPortalComponent Co-authored-by: dkamburov <1182001+dkamburov@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Added childkey to fix the hierarchy in treegrid Added a large set of image files for various countries and UI elements.
…nt theme for hrportal component
… for their columns
Replaced global IgniteUI.Blazor theme links with dynamic, per-component theme loading using a new scope-css.js utility. Updated all projects to use IgniteUI.Blazor 25.2.83 (non-trial). Refactored TabNavigation and HRPortal components to load and scope Material and Fluent themes only where needed, enabling multiple themes in the same app. Cleaned up related CSS and improved code consistency.
Eliminated the OnDataChanged event and related logic from HRService and HRPortalComponent. The component no longer subscribes to data change events or implements IDisposable for event unsubscription. State updates are now managed explicitly rather than via event notifications.
Moved theme scoping logic from Blazor components to scope-css.js, which now applies IgniteUI themes globally on load. Updated App.razor to load scope-css.js from the local scripts directory and removed redundant script tags. Added null checks to icon registration in HRPortalComponent.razor to prevent potential errors.
Refactored TabNavigation.razor markup for improved nesting and semantic grouping of tab info and actions. Added box-sizing: border-box to .tab-item in app.css for more consistent sizing and layout. No functional changes to logic or behavior.
The HR Portal sample existed but used a flat
IgbGridwith HTTP-loaded data. This replaces it with anIgbTreeGriddisplaying a hierarchical org chart using dynamic data from the Infragistics endpoint, using the Fluent Light theme as specified.Model (
EmployeeData.cs)ParentId(nullable int) — required for flat tree binding viaForeignKeyIdnon-nullable — semantic requirement forPrimaryKeyManagerfield (maps to"Manager"JSON property from the endpoint)Service (
HRService.cs)HttpClient-based dynamic data loading fromhttps://www.infragistics.com/grid-examples-data/data/hr/hr.jsonAddHttpClient<HRService>()in both the standalone app and main hostComponent (
HRPortalComponent.razor)All columns are sortable and resizable, including
Manager. TheNamecolumn serves as the tree expansion column.The toolbar matches the WebComponents design reference and includes:
Theme & Navigation
App.razor:bootstrap.css→fluent.css(Fluent Light)TabNavigation.razor: added per-tabThemeproperty; HR Portal tab now shows"Theme: Fluent"dynamically instead of the hardcoded"Bootstrap"labelOriginal prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.