Flexmonster Software License Agreement (“Agreement”) has been significantly revised and is effective as of September 30, 2024.
The following modifications were made:
The modified version of Flexmonster Software License Agreement is available here.
Downloading, installing, and/or continuing to use Flexmonster Software after September 30, 2024, constitutes Licensee’s acceptance of the terms and conditions of the modified version of Flexmonster Software License Agreement. If Licensee does not agree to any of these terms and conditions, they must cease using Flexmonster Software and must not download, install, use, access, or continue to access Flexmonster Software. By continuing to use Flexmonster Software or renewing the license under License Model or Maintenance after the effective date of any modifications to Agreement, Licensee accepts and agrees to be bound by the terms and conditions of the modified Agreement.
This guide lists examples of Flexmonster usage in Blazor. They are provided within our sample Blazor project.
The first example demonstrates how to embed Flexmonster into your project with the FlexmonsterComponent.
Notice how initialization parameters are specified in <FlexmonsterComponent>
:
<FlexmonsterComponent Report="@report" Width="100%" Height="600" Toolbar=true> </FlexmonsterComponent> @code { string report = "https://cdn.flexmonster.com/github/demo-report.json"; }
Learn more about FlexmonsterComponent
and its parameters: The FlexmonsterComponent.
This usage example focuses on Flexmonster events. It provides a toggle button to subscribe to all the events and unsubscribe from them.
Under the component, there is a log output. When an event is triggered, the output shows info about that event.
To subscribe to an event, we use the +=
operator:
flexmonster.<EventName> += EventHandlerName;
To unsubscribe from an event, we use the -=
operator:
flexmonster.<EventName> -= EventHandlerName;
Learn more about using Flexmonster events in Blazor.
The Using API calls section is about interacting with the component through API calls. Use the toggle buttons to enable the read‑only mode or switch between the grid and charts.
See how the API calls are used:
private async Task ControllGridCharts(bool isGrid) { if (!isGrid) { await flexmonster.ShowGrid(); } else { await flexmonster.ShowCharts(); } }
private async Task ControllInteractiveness(bool isReadonly) { await flexmonster.SetOptions(new Options() { ReadOnly = isReadonly }); await flexmonster.Refresh(); }
Learn more about using Flexmonster methods in Blazor.
The Updating data section shows how to refresh data at runtime.
Each time you click the Update data button, the dataset is updated and loaded to Flexmonster using the updateData() API call:
private async Task UpdateData() { var newData = new object[] { // Updated data }; await flexmonster.UpdateData(new DataSource() { Data = newData }); }
Learn more about using Flexmonster methods in Blazor.