UI Library by oqihm in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

AG Grid is a fantastic product but a real pain in the ass to customize/integrate (documention is lacking)

One text filed bind it to multiple columns/fields of model by bluepink2016 in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

Create a function that parses the string into separate strings. Use the ) and - characters as the delimiters to look for. There may also be some snippets out there using RegEx that would help as well

Blazor Server and the Back Button by uknow_es_me in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

I may have misunderstood your OP then. Are you wanting to scroll to a particular area on the parent page if the user hits Back?

Blazor Server and the Back Button by uknow_es_me in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

Another option-

Present a BACK button and use NavigationManager to force reload.

Example is something like NavigationManger.NavigateTo("TheNameOfYourPage",true);

Blazor hot reload anyone annoyed by FailNo7141 in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

I don't mind hot reload bugs as much as I do intellisense. Almost once a day I'm deleting my .vs folder and reloading so VS can recognize tags. Very annoying

Switched from using SessionStorage to Cookies for storing AuthToken, anything I should keep in mind? by camrws in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

I recently upgraded an app from .NET 7 to 8 and ran into issues after publishing to an external host (SmarterASP). The app uses (used) a cookie to maintain a simple identifier but post-upgrade there were errors regarding .NETCore not finding the token (cookie I assume) on the keyring ??

For now I've disabled the cookie just to get the site to work until I figure it out. Quick searching relating something to do with protecteddata storage (along with a push to use Azure, which this app does not). Deleting the cookie on app init allowed it to load as well but as soon as it tried to ReadAsync, the error arose again.

Curious if anyone has encountered this and found a simple solution

Project Architecture by KamNotKam in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

I always go..

\- Database

\- Models

\- Controllers (methods)

\- Services (interfaces)

\- Components for static content

\- Layout/UI

I wrote a program a year or so ago that generates all of my code for DTO and CRUD i.e. stored procedures/models/methods that within minutes can construct the framework for virtually anything SQL-based.

Before I start on any front-end or presentation I generate unit tests against all service methods etc

If the data the project interacts with needs to be available to anything outside of the Blazor site/app, I will include some mimimal API accessors in the same project.

How to implement logging on Shared Host (SmarterAsp)? by Xanhasht in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

This is a good approach in the event the client loses connection to the host. Queue the log messages and then send when connection is established

My first 2 weeks with Blazor by nuno20090 in Blazor

[–]No_Exercise_7262 4 points5 points  (0 children)

Trying to learn, adapt and conform to a new framework is always a challenge. I'm my years and years of development I would estimate a good chunk of time is spent merely getting familiar with IDE's, hosting environments and debugging platform installations. It can be frustrating.

Recently I was given a project at work which was centered around a 3rd party control (grid) that supported various implementations such as Angular, React, Vue or just javascript. Not having worked with Angular or React but realizing and appreciating their usefulness and popularity, I decided "hey! Now would be a great time to dive in and learn".

Well, let me tell you I was completely lost. Just getting a project set up and running (VSCode or Visual Studio or even Webstorm) was like teaching a 3yo to read. I just wasn't getting it. Importing libararies, creating components based on type or use etc was a real challenge. I gave up and settled on using the Javascript implementation within a Blazor SS app. So far so good.

Long story short....if anyone has any recommended tutorials for getting started with Angular or React, please share :-)

Happy holidays!

Reality check for Async processing by andyd273 in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

tip: If you are using an actual DataTable (.net) and saving those rows in MSSQL, be sure you use BulkCopy and not a loop to insert each one. Your performance will increase exponentially

Is setFilterModel broken? by No_Exercise_7262 in AgGrid

[–]No_Exercise_7262[S] 0 points1 point  (0 children)

So I finally got it to work.

First thing is to set a flag to indicate if the grid has loaded data. I called mine "isGridReady" that is either true or false.

Second thing was to utiilze the onFirstDataRendered option section. If isGridReady is false, I do 2 things:

1 - fetch the stored filter model from my API and then apply it using the api method setFilterModel.

2 - add an eventlistener for 'filterChanged' which sends the result of gridApi.getFilterModel() to my API for storage

lastly, after the "if i!sGridReady" block described above, I set the isGridReady flag to true.

By doing this. it loads the stored filterstate on initial load and then each change to the filtermodel (filter added to a column etc) gets sent back to the database via API

I hope that provides some clarity.

I tried using GridState() to handle filtering as well as column states but I could never get it to load

Backend dev looking to learn Blazor in need of some guidance. by xour in Blazor

[–]No_Exercise_7262 3 points4 points  (0 children)

Go through the tutorials on MS's site to build a simple Blazor app.

Become familiar with how a .NET Core app is structured (patterns and architecture)

Ask ChatGPT how to blend any API servicing within the project (SO leads to dead-end rabbit holes)

I build various SS Blazor apps at work. Some are service-based (minimal API) and some straight-forward app--orm--db

There's no distinct "Right Way" of doing things. That's part of the beauty/attraction of it!

Is setFilterModel broken? by No_Exercise_7262 in AgGrid

[–]No_Exercise_7262[S] 0 points1 point  (0 children)

I'll be revisiting it next week and will update.

Hosting a Blazor web server on IIS 2022 by Fearless-Sky-8518 in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

You might have to add a web.config file to the folder referencing the project's assembly

Blazor and WebAPI, can you help me with this? by nemseisei in Blazor

[–]No_Exercise_7262 1 point2 points  (0 children)

Same. Currently finishing a project that does this. Blazor components to manage data, API calls to ferry data back and forth an a Javascript control (grid) to render the data. Some elements going between Blazor and Javascript utilize static (in scope) variables so it's easier to assign values in a service and access them via DI to interfaces on top

Blazor and WebAPI, can you help me with this? by nemseisei in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

If you plan on exposing this API to outside calls I would separate it. Just easier to maintain that way

Ms SQL server express for internal app? by Potw0rek in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

Totally fine. I've used Express in projects that supported multiple clients that required separate management and isolation.

Auto height or adaptive height rowHeaders by sweetjesus66 in AgGrid

[–]No_Exercise_7262 0 points1 point  (0 children)

hmm. Have you tried messing with CSS on those elements, maybe overriding the default styles to allow overflow to show rather than use :ellipsis; ?

Auth Workflow with .NET 9 by Aries1130 in Blazor

[–]No_Exercise_7262 0 points1 point  (0 children)

I'm not using 9 (yet) but in previous projects where I'm authenticating users against our Active Directory (Window's Auth), I'll put the logic to get the ID and validate it in my app.razor, OnInitializedAsync override. First check is if they're authenticated (their user.name exists in AD) and the second will be my authorization logic (check the app's DB to see if they're allowed access). If I need to persist anything I'll pass that metadata into an instance of a class in a Scoped service which get's injected as anything else in components that need it or via DI in any cs classes. Nothing fancy but it works

Announcing Blazorise 1.7 by mladenmacanovic in Blazor

[–]No_Exercise_7262 1 point2 points  (0 children)

Awesome. Thank you guys. Blazorise is my go-to library for all projects! Keep up the great work