Comments (6)
I've published a new package version (5.0.10) with your code modification.
Thks.
from grid.blazor.
Could you send me the page where the grid is defined and the custom CRUD components?
from grid.blazor.
Thank you for your help.
Here is my code for your reference.
PaymentDestination.razor.cs
var client = new GridClient<Models.PaymentDestination>((q) => _masterDataService.GetGridRows(datas, columns, q), query, false,
nameof(Models.PaymentDestination), columns, MasterDataRepository.LocaleCultureInfo)
.Sortable()
.Filterable()
.SetStriped(true)
.Selectable(true, true, false)
.Crud(true, _masterDataService)
.SetCreateComponent<PaymentDestinationCreateComponent>()
//.SetUpdateComponent<PaymentDestinationUpdateComponent>()
.SetHeaderCrudButtons(true);
PaymentDestinationCreateComponent.razor
@using GridBlazor
@using GridBlazor.Resources
@inherits GridCreateComponent<Models.PaymentDestination>
<h1>@Strings.Add 施行支払先</h1>
<EditForm Model="@Item" OnValidSubmit="@CreateItem">
<DataAnnotationsValidator />
<ValidationSummary />
<div class="form-horizontal">
<div class="form-group">
<label for="FuneralCompanyId" class="control-label col-md-2">FuneralCompanyId: </label>
<div class="col-md-5">
<InputNumber id="FuneralCompanyId" class="form-control" readonly="readonly" @bind-Value="Item.FuneralCompanyId" />
</div>
</div>
<div class="form-group">
<div class="col-md-5">
<button type="submit" class="btn btn-primary btn-md">@Strings.Save</button>
<button type="button" class="btn btn-primary btn-md" @onclick="BackButtonClicked">@Strings.Back</button>
</div>
</div>
</div>
</EditForm>
from grid.blazor.
I'm so sorry, I debugged the code again and found that it was a problem with my code.
The entity class configured in the client and the entity class configured in the page component are two classes with the same name but different namespaces.
The issue has been solved!
from grid.blazor.
I'm encountering a problem when trying to reset the value of Item.FuneralCompanyId. Despite invoking StateHasChanged() after resetting the property on Item, the component doesn't reflect the new value. However, when I press the 'Save' button, the new value is rendered correctly. Is there a way to create a function to force the rendering?
Additionally, changing the access modifier of IJSRuntime jSRuntime from private to protected seems beneficial for usage within a custom CRUD component.
from grid.blazor.
I created a pull request (#411) to make the StateHasChanged() method effective in triggering component re-rendering.
from grid.blazor.
Related Issues (20)
- File upload crushes in debug mode HOT 7
- How to sort the grid using an API rest as a data source HOT 1
- Did development stop on this component? HOT 1
- Error when table filter is invalid HOT 3
- Show selected filters [Blazor] HOT 1
- Bulgarian language inaccuracies HOT 1
- Request for adding localization languages. HOT 3
- ItemsToDisplay HOT 6
- Change cell background color depending on value. HOT 2
- Serialize ISGrid HOT 2
- SubGrid button bar is not displayed HOT 2
- Two errors in version 5.0.3 HOT 4
- .WithPaging - how can i make the parameter dynamically from user input on grid HOT 1
- IGridColumnCollection on GridServer HOT 3
- Condition and Id on RenderValueAs HOT 1
- Net 8 Support HOT 8
- Export grid to excel, hexadecimal value 0x1D, is an invalid character. HOT 4
- Client cannot render response from Server - GridShared.Pagination.PagingType HOT 1
- Exporting a grid crashes (for me) in latest version 5.0.12 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grid.blazor.