diff --git a/GridBlazor/GridBlazor.csproj b/GridBlazor/GridBlazor.csproj
index 4d01b6b0..bb21cf3b 100644
--- a/GridBlazor/GridBlazor.csproj
+++ b/GridBlazor/GridBlazor.csproj
@@ -6,7 +6,7 @@
8.0
True
False
- 3.2.0
+ 3.2.1
GridBlazor
Grid components for Blazor
Grid components for Blazor
diff --git a/GridBlazor/Pages/GridComponent.razor.cs b/GridBlazor/Pages/GridComponent.razor.cs
index e545db43..91ff644f 100644
--- a/GridBlazor/Pages/GridComponent.razor.cs
+++ b/GridBlazor/Pages/GridComponent.razor.cs
@@ -1314,7 +1314,7 @@ protected virtual async Task OnAfterBack()
}
}
- public async Task CreateItem(GridCreateComponent component)
+ public async Task CreateItem(GridCreateComponent component)
{
try
{
@@ -1347,7 +1347,8 @@ public async Task CreateItem(GridCreateComponent component)
_shouldRender = true;
StateHasChanged();
}
- }
+ }
+ return isValid;
}
catch (Exception e)
{
@@ -1374,7 +1375,7 @@ protected virtual async Task OnAfterInsert(GridCreateComponent component)
}
}
- public async Task UpdateItem(GridUpdateComponent component)
+ public async Task UpdateItem(GridUpdateComponent component)
{
try
{
@@ -1383,7 +1384,7 @@ public async Task UpdateItem(GridUpdateComponent component)
{
await ShowSpinner();
if (((CGrid)Grid).CrudFileService != null)
- Item = await((CGrid)Grid).CrudFileService.UpdateFiles(Item, component.Files);
+ Item = await ((CGrid)Grid).CrudFileService.UpdateFiles(Item, component.Files);
await ((CGrid)Grid).CrudDataService.Update(Item);
await HideSpinner();
((CGrid)Grid).Mode = GridMode.Grid;
@@ -1395,6 +1396,7 @@ public async Task UpdateItem(GridUpdateComponent component)
_shouldRender = true;
StateHasChanged();
}
+ return isValid;
}
catch (Exception e)
{
@@ -1421,7 +1423,7 @@ protected virtual async Task OnAfterUpdate(GridUpdateComponent component)
}
}
- public async Task DeleteItem(GridDeleteComponent component)
+ public async Task DeleteItem(GridDeleteComponent component)
{
try
{
@@ -1443,6 +1445,7 @@ public async Task DeleteItem(GridDeleteComponent component)
_shouldRender = true;
StateHasChanged();
}
+ return isValid;
}
catch (Exception e)
{
diff --git a/GridBlazor/Pages/GridCreateComponent.razor.cs b/GridBlazor/Pages/GridCreateComponent.razor.cs
index a5a1496b..26744cc5 100644
--- a/GridBlazor/Pages/GridCreateComponent.razor.cs
+++ b/GridBlazor/Pages/GridCreateComponent.razor.cs
@@ -205,10 +205,13 @@ protected async Task CreateItem()
try
{
- Error = "";
- ColumnErrors = new QueryDictionary();
- _tabGroups = null;
- await GridComponent.CreateItem(this);
+ bool isValid = await GridComponent.CreateItem(this);
+ if (isValid)
+ {
+ Error = "";
+ ColumnErrors = new QueryDictionary();
+ _tabGroups = null;
+ }
}
catch (GridException e)
{
diff --git a/GridBlazor/Pages/GridDeleteComponent.razor.cs b/GridBlazor/Pages/GridDeleteComponent.razor.cs
index fd5d9e61..240d5f40 100644
--- a/GridBlazor/Pages/GridDeleteComponent.razor.cs
+++ b/GridBlazor/Pages/GridDeleteComponent.razor.cs
@@ -130,8 +130,9 @@ public async Task DeleteItem()
try
{
- _tabGroups = null;
- await GridComponent.DeleteItem(this);
+ bool isValid = await GridComponent.DeleteItem(this);
+ if(isValid)
+ _tabGroups = null;
}
catch (GridException e)
{
diff --git a/GridBlazor/Pages/GridUpdateComponent.razor.cs b/GridBlazor/Pages/GridUpdateComponent.razor.cs
index 1efc6805..f6df4aeb 100644
--- a/GridBlazor/Pages/GridUpdateComponent.razor.cs
+++ b/GridBlazor/Pages/GridUpdateComponent.razor.cs
@@ -225,10 +225,13 @@ protected async Task UpdateItem()
try
{
- Error = "";
- ColumnErrors = new QueryDictionary();
- _tabGroups = null;
- await GridComponent.UpdateItem(this);
+ bool isValid = await GridComponent.UpdateItem(this);
+ if (isValid)
+ {
+ Error = "";
+ ColumnErrors = new QueryDictionary();
+ _tabGroups = null;
+ }
}
catch (GridException e)
{
diff --git a/GridCore/GridCore.csproj b/GridCore/GridCore.csproj
index a0c758c3..a126250a 100644
--- a/GridCore/GridCore.csproj
+++ b/GridCore/GridCore.csproj
@@ -7,7 +7,7 @@
False
GridCore
GridCore
- 5.2.0
+ 5.2.1
GridCore
Grid core component
Grid core component
diff --git a/GridMvc/GridMvc.csproj b/GridMvc/GridMvc.csproj
index 22768161..4f567108 100644
--- a/GridMvc/GridMvc.csproj
+++ b/GridMvc/GridMvc.csproj
@@ -8,7 +8,7 @@
False
GridMvc
GridMvcCore
- 5.2.0
+ 5.2.1
GridMvc
ASP.NET MVC Grid component
ASP.NET MVC Grid component
diff --git a/GridShared/GridShared.csproj b/GridShared/GridShared.csproj
index e1250c64..7e5d04ed 100644
--- a/GridShared/GridShared.csproj
+++ b/GridShared/GridShared.csproj
@@ -3,7 +3,7 @@
netstandard2.1;net5.0;net6.0
8.0
- 5.2.0
+ 5.2.1
GridShared
Support library for GridBlazor and GridMvcCore component libraries
Support library for GridBlazor and GridMvcCore component libraries