From 189cdf670f58cc260e0768a6e86a5a61442cc031 Mon Sep 17 00:00:00 2001 From: Gustau Navarro Date: Thu, 17 Mar 2022 23:35:46 +0100 Subject: [PATCH] New SetTextArea method for the column definition --- GridBlazor/Columns/GridColumnBase.cs | 13 +++++++++++++ GridBlazor/GridBlazor.csproj | 4 ++-- GridBlazor/Pages/GridCreateComponent.razor | 6 +++--- GridBlazor/Pages/GridDeleteComponent.razor | 2 +- GridBlazor/Pages/GridReadComponent.razor | 2 +- GridBlazor/Pages/GridUpdateComponent.razor | 4 ++-- .../ColumnCollections/ColumnCollections.cs | 2 +- .../GridBlazorClientSide.Client.csproj | 2 +- .../GridBlazorOData.Client.csproj | 2 +- .../Pages/EmployeeComponent.razor | 2 +- .../ColumnCollections/ColumnCollections.cs | 2 +- GridBlazorServerSide/GridBlazorServerSide.csproj | 2 +- .../ColumnCollections/ColumnCollections.cs | 2 +- GridBlazorStandalone/GridBlazorStandalone.csproj | 2 +- GridCore/Columns/GridCoreColumnBase.cs | 13 +++++++++++++ GridCore/GridCore.csproj | 2 +- .../BlazorComponents/EmployeeComponent.razor | 2 +- GridMvc.Demo/GridMvc.Demo.csproj | 2 +- GridMvc/GridMvc.csproj | 2 +- GridShared/Columns/IGridColumn.cs | 11 +++++++++++ GridShared/GridShared.csproj | 2 +- docs/blazor_client/Crud.md | 7 ++++++- docs/blazor_local/Crud.md | 7 ++++++- docs/blazor_odata/Crud.md | 7 ++++++- docs/blazor_server/Crud.md | 7 ++++++- docs/dotnetcore_blazor/Crud.md | 7 ++++++- 26 files changed, 89 insertions(+), 27 deletions(-) diff --git a/GridBlazor/Columns/GridColumnBase.cs b/GridBlazor/Columns/GridColumnBase.cs index f9542923..2165f2be 100644 --- a/GridBlazor/Columns/GridColumnBase.cs +++ b/GridBlazor/Columns/GridColumnBase.cs @@ -97,6 +97,8 @@ public abstract class GridColumnBase : GridStyledColumn, IGridColumn, IExp public InputType InputType { get; protected set; } + public int TextAreaRows { get; set; } = 5; + public bool MultipleInput { get; protected set; } = false; public bool ToggleSwitch { get; protected set; } = false; @@ -625,6 +627,17 @@ public IGridColumn SetInputType(InputType inputType) return this; } + public IGridColumn SetTextArea() + { + return SetInputType(InputType.TextArea); + } + + public IGridColumn SetTextArea(int rows) + { + TextAreaRows = rows; + return SetTextArea(); + } + public IGridColumn SetInputFileType(bool? multiple = null) { IsSelectField = (false, null, null, null, null); diff --git a/GridBlazor/GridBlazor.csproj b/GridBlazor/GridBlazor.csproj index bb21cf3b..8fc82fe9 100644 --- a/GridBlazor/GridBlazor.csproj +++ b/GridBlazor/GridBlazor.csproj @@ -6,7 +6,7 @@ 8.0 True False - 3.2.1 + 3.2.2 GridBlazor Grid components for Blazor Grid components for Blazor @@ -48,7 +48,7 @@ - + diff --git a/GridBlazor/Pages/GridCreateComponent.razor b/GridBlazor/Pages/GridCreateComponent.razor index 4b2f278a..cde54e04 100644 --- a/GridBlazor/Pages/GridCreateComponent.razor +++ b/GridBlazor/Pages/GridCreateComponent.razor @@ -68,7 +68,7 @@ @ColumnErrors.Get(column.FieldName) - + } } else if (((IGridColumn)column).IsSelectColumn.IsSelectKey) @@ -147,7 +147,7 @@ } else if (type == typeof(string) && ((IGridColumn)column).InputType == InputType.TextArea) { -