I have a simple add/update page - for a customer. I click Submit, the database is updated accordingly and I show a dialog message box - all ok, but then I cannot edit any of the fields on that page unless I manually refresh the page?
I guess this is something daft on my part, but I cannot find out why this is happening.
Most probably there is a exception - check your browser console for reference. Furthermore you can run the application in debug mode to check why the exception is raised.
I tried this out, but no exceptions are showing, either in debug mode or in the browser console. Originally, it was even happening if a validation event was triggered, but that's not now the case.
I've now discovered that it's related to using a transaction when posting to the back end database. If I remove any use of transaction processing, all is fine, but I will need to use it, so I'll do some more experimenting!
mumfie, I'm very much obliged to you. Having corrected some code re my transctions, I was still having the issue, but replacing the dialog messaging with a notify instead has resolved the issue.
Glad you got it working. Not sure why the dialog did'nt work but I suspect you might be calling a modal dialog from a modal type edit page and I don't recall if I have tried that.
Another option is to display the error within the active screen.
I actually need to use a confirm type dialogue box now, and I still encounter the problem where the Page on which the dialog is shown locks all the fields until I refresh it. I'm not doing any database updates, just putting out a simple are you sure message and, if No is selected, my code actually does nothing. The dialog closes, but all fields are locked.
The page I'm on is not modal, it's simply opened from the system's menu using NavigateTo.
In MainLayout.razor I just have a tag, then in the page in question, here is the layout and code
I tried it in a simple example using Net 7 and a none modal edit form and it appears to work as expected.
After selecting No from the Confirm dialog the modal frame is removed and the edit form fields are again editable.
Thanks mumfie. I used your idea - created a simple new page - and experimented from there. Found out that if I used a different layout file on that page the problem disappeared, so did some browsing and discovered something I'd missed before about having these tags at the top of the MainLayout.razor page: