From 6079e73d48cac30d7bfce37b0838b79d4ddbfc60 Mon Sep 17 00:00:00 2001 From: Gustau Navarro Date: Sat, 20 Nov 2021 16:58:18 +0100 Subject: [PATCH] Fix checkbox columns non proper rendered in CRUD with Boostrap 5.x (https://github.com/gustavnavar/Grid.Blazor/issues/321) --- GridBlazor/Pages/GridCreateComponent.razor | 354 ++++++++++----------- GridBlazor/Pages/GridDeleteComponent.razor | 4 +- GridBlazor/Pages/GridReadComponent.razor | 4 +- GridBlazor/Pages/GridUpdateComponent.razor | 8 +- GridBlazor/wwwroot/css/gridblazor.css | 2 +- GridBlazor/wwwroot/css/gridblazor.min.css | 2 +- GridMvc/Resources/css/gridmvc.css | 2 +- GridMvc/Resources/css/gridmvc.min.css | 2 +- 8 files changed, 189 insertions(+), 189 deletions(-) diff --git a/GridBlazor/Pages/GridCreateComponent.razor b/GridBlazor/Pages/GridCreateComponent.razor index f45ea43d..d5685538 100644 --- a/GridBlazor/Pages/GridCreateComponent.razor +++ b/GridBlazor/Pages/GridCreateComponent.razor @@ -41,250 +41,250 @@ { } -
- @if (((IGridColumn)column).IsSelectField.IsSelectKey) - { - if (((IGridColumn)column).ReadOnlyOnCreate(Item)) +
+ @if (((IGridColumn)column).IsSelectField.IsSelectKey) { - string text = ((IGridColumn)column).GetFormatedValue(((IGridColumn)column).IsSelectField.Expression, Item); - - } - else - { - var selectedValue = column.GetFormatedValue(value); - + } + else + { + var selectedValue = column.GetFormatedValue(value); + - } - } - else if (((IGridColumn)column).IsSelectColumn.IsSelectKey) - { - if (((IGridColumn)column).ReadOnlyOnCreate(Item)) - { - string text = ((IGridColumn)column).GetFormatedValue(((IGridColumn)column).IsSelectColumn.Expression, Item); - + + } } - else + else if (((IGridColumn)column).IsSelectColumn.IsSelectKey) { - var selectedValue = column.GetFormatedValue(value); - + } + else + { + var selectedValue = column.GetFormatedValue(value); + + + } } - } - else - { - if (((IGridColumn)column).ReadOnlyOnCreate(Item)) + else { - if (type == typeof(bool)) + if (((IGridColumn)column).ReadOnlyOnCreate(Item)) { - if (value != null && (bool)value == true) + if (type == typeof(bool)) { - if (column.ToggleSwitch) + if (value != null && (bool)value == true) { - - - + if (column.ToggleSwitch) + { + + + + } + else + { + + } } else { - + if (column.ToggleSwitch) + { + + + + } + else + { + + } } } + else if (type == typeof(string) && ((IGridColumn)column).InputType == InputType.TextArea) + { +