13 July 2024

Blazor, Execute a method of a component

My problem: When my application is launched, I display my component without any data. The user loads a file. The data is then drawn by the component. A bit like when you open Excel and the default grid is empty…

The method I’ve chosen is to call my component’s drawing method once the user has opened the file. Here’s what it looks like:

I’m afraid you’re going to be disappointed, because it’s very simple. Of course, the method of your component must be public. Then put a reference to your component so that you can call it, followed by the name of the method!


Leave a Reply