Relative Content

Tag Archive for blazor

Blazor 8 sample: multiple DB reloads

I’m using the MS sample (https://github.com/dotnet/blazor-samples) as it’s about all I need to re-write reports for a legacy DB. I notice it seems to reload from the DB without interaction from me i.e. just opening the home page. It seems like it’s going into home.razor a number of times (e.g. it hits my breakpoint on _lastPage initialization) causing it to query the DB each time. With the simple/local DB they use that’s not much of a performance issue but with a real/remote DB it adds a lot of time.
So what’s triggering the ‘refresh’ and can/should I avoid it?

Blazor Force all child components refresh

How to force all childs refresh even if no child parameters are changed by parent?
Actually is there any way to call StateHasChanged() on parent and all childs refresh?

On change event for input select isnt firing

I am having the below inputselect and all I want is a cascading ones, so if you choose a branch, the tables will be filtered. I’ve been stuck for over a week and not sure why its not working.

Sort ValidationMessageStore by display order attribute

I’m using Blazor Web App and have a component that uses EditForm and ValidationSummary. All works well, except I want to sort the error messages by the order specified in my model. Here’s my simpified-for-example model:

Blazor EventCallback from a SSR parent to an InteractiveServer Child Component is Null

I have a SSR Parent component with a Child component with InteractiveServer render mode. I need this child component to be interactive so that I can bind to events like @onclick etc. I want to pass data/value back to the parent using EventCallback but this delegate is never set I guess due to different render modes, is there another way to do this?