From 2bcfe8444fd25c70bc3e58f829e0e55856c4ef4d Mon Sep 17 00:00:00 2001 From: gustavnavar Date: Thu, 14 Nov 2024 13:44:17 +0100 Subject: [PATCH] Update documentation --- GridBlazorGrpc.Client/Program.cs | 3 +++ GridBlazorJava/Program.cs | 3 +++ GridBlazorServerSide/Program.cs | 8 -------- GridBlazorServerSide/Startup.cs | 4 ++++ GridBlazorStandalone/Program.cs | 5 +++-- README.md | 11 +++++++++-- docs/blazor_client/Installation.md | 26 ++++++++++++++++++++++++-- docs/blazor_grpc/Installation.md | 27 +++++++++++++++++++++++++-- docs/blazor_local/Installation.md | 25 ++++++++++++++++++++++++- docs/blazor_odata/Installation.md | 29 ++++++++++++++++++++++++++--- docs/blazor_server/Installation.md | 27 +++++++++++++++++++++++++-- 11 files changed, 146 insertions(+), 22 deletions(-) diff --git a/GridBlazorGrpc.Client/Program.cs b/GridBlazorGrpc.Client/Program.cs index dd8c33b3..9140eb70 100644 --- a/GridBlazorGrpc.Client/Program.cs +++ b/GridBlazorGrpc.Client/Program.cs @@ -2,6 +2,7 @@ using GridBlazorGrpc.Client.Services; using GridBlazorGrpc.Shared.Models; using GridShared; +using GridShared.Style; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.JSInterop; @@ -29,6 +30,8 @@ public static async Task Main(string[] args) builder.Services.AddScoped, EmployeeFileService>(); builder.Services.AddLocalization(); + builder.Services.AddGridBlazor(x => x.Style = CssFramework.Bootstrap_4); + var host = builder.Build(); var jsInterop = host.Services.GetRequiredService(); var result = await jsInterop.InvokeAsync("blazorCulture.get"); diff --git a/GridBlazorJava/Program.cs b/GridBlazorJava/Program.cs index bd119baf..db4a3452 100644 --- a/GridBlazorJava/Program.cs +++ b/GridBlazorJava/Program.cs @@ -9,6 +9,7 @@ using System.Globalization; using System.Net.Http; using System.Threading.Tasks; +using GridShared.Style; namespace GridBlazorJava { @@ -29,6 +30,8 @@ public static async Task Main(string[] args) builder.Services.AddLocalization(); + builder.Services.AddGridBlazor(x => x.Style = CssFramework.Bootstrap_4); + var host = builder.Build(); var jsInterop = host.Services.GetRequiredService(); var result = await jsInterop.InvokeAsync("blazorCulture.get"); diff --git a/GridBlazorServerSide/Program.cs b/GridBlazorServerSide/Program.cs index ce2b27ce..95e75db8 100644 --- a/GridBlazorServerSide/Program.cs +++ b/GridBlazorServerSide/Program.cs @@ -1,13 +1,5 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; namespace GridBlazorServerSide { diff --git a/GridBlazorServerSide/Startup.cs b/GridBlazorServerSide/Startup.cs index abc29b0a..a382d112 100644 --- a/GridBlazorServerSide/Startup.cs +++ b/GridBlazorServerSide/Startup.cs @@ -1,3 +1,4 @@ +using GridBlazor; using GridBlazorServerSide.Data; using GridBlazorServerSide.Services; using Microsoft.AspNetCore.Builder; @@ -10,6 +11,7 @@ using System.Collections.Generic; using System.Globalization; using GridShared.Data; +using GridShared.Style; namespace GridBlazorServerSide { @@ -32,6 +34,8 @@ public void ConfigureServices(IServiceCollection services) //options.ConfigureWarnings(warnings => warnings.Ignore(RelationalEventId.QueryClientEvaluationWarning)); }); + services.AddGridBlazor(x => x.Style = CssFramework.Bootstrap_4); + services.AddControllers(); services.AddRazorPages(); services.AddServerSideBlazor(); diff --git a/GridBlazorStandalone/Program.cs b/GridBlazorStandalone/Program.cs index 4c180238..4c134734 100644 --- a/GridBlazorStandalone/Program.cs +++ b/GridBlazorStandalone/Program.cs @@ -1,7 +1,6 @@ using GridBlazor; using GridBlazorStandalone.Services; -using GridBlazorStandalone.Models; -using GridShared; +using GridShared.Style; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using Microsoft.Extensions.DependencyInjection; using Microsoft.JSInterop; @@ -31,6 +30,8 @@ public static async Task Main(string[] args) builder.Services.AddLocalization(); + builder.Services.AddGridBlazor(x => x.Style = CssFramework.Bootstrap_4); + var host = builder.Build(); var jsInterop = host.Services.GetRequiredService(); var result = await jsInterop.InvokeAsync("blazorCulture.get"); diff --git a/README.md b/README.md index cfbb9d94..32790e87 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ GridBlazor is a Blazor component that shows data in a grid. It requires a back-end component that performs paging, sorting, filtering and others. This back-end component can be one of the following: -- GridCore (v.5.0.0 or later), supporting ASP.Net Core 3.1, ASP.Net 5.0, ASP.Net 6.0 and ASP.Net 7.0. GridMvcCore, that it is a fork from https://gridmvc.codeplex.com/, was working for earlier versions. But GridMvcCore is only required for Blazor WASM (REST) and ASP.NET MVC projects now. +- GridCore (v.6.0.0 or later), supporting ASP.Net Core 3.1, ASP.Net 5.0, ASP.Net 6.0, ASP.Net 7.0, ASP.Net 8.0 and ASP.Net 9.0. GridMvcCore, that it is a fork from https://gridmvc.codeplex.com/, was working for earlier versions. But GridMvcCore is only required for Blazor WASM (REST) and ASP.NET MVC projects now. - an OData back-end. All samples are based on Microsoft.AspNetCore.OData library, but it can be any other OData provider. - GridJavaCore back-end for Java JPA / Hibernate projects (https://github.com/gustavnavar/Grid.Java.Core) -It supports .NET Core 3.1 and 5.0, 6.0, 7.0 and 8.0, and Blazor WebAssembly 3.2.0, 5.0, 6.0, 7.0 and 8.0 +GridBlazor supports .NET Core 3.1 and 5.0, 6.0, 7.0, 8.0 and 9.0, and Blazor WebAssembly 3.2.0, 5.0, 6.0, 7.0, 8.0 and 9.0 ## Demo - http://gridblazor.azurewebsites.net @@ -62,6 +62,13 @@ This is an example of a table of items using this component: ## Notes +- GridBlazor 6.0.0 supports the following CSS frameworks: + - Bootstrap_4 https://getbootstrap.com/docs/4.0/getting-started/introduction/ (default) + - Bootstrap_5 https://getbootstrap.com/docs/5.0/getting-started/introduction/ + - Bootstrap_3 https://getbootstrap.com/docs/3.4/getting-started/ + - Materialize https://materializeweb.com/ + - Bulma https://bulma.io/ + - GridBlazor 3.4.1 supports the build-in InputFile component for columns of type "file" for .Net 6.0 and later projects. The old Agno.BlazorInputFile component is ussed for .Net Core 3.1 and .Net 5.x projects. See https://github.com/gustavnavar/Grid.Blazor/blob/master/docs/blazor_client/Crud.md#file-type-columns - GridBlazor 3.0.0 supports .Net 6.0 diff --git a/docs/blazor_client/Installation.md b/docs/blazor_client/Installation.md index 5cc9e505..963b28dd 100644 --- a/docs/blazor_client/Installation.md +++ b/docs/blazor_client/Installation.md @@ -19,10 +19,32 @@ The **GridBlazor** component installation is straightforward. Just follow these ``` These files will be loaded from the **GridBlazor** nuget package, so it is not necessary to copy it to you project. +5. Add this line to the **Program.cs** file on the client project: + ```c# + builder.Services.AddGridBlazor(x => x.Style = CssFramework.Bootstrap_4); + ``` + You can select the CSS framework used in your project among the following: + - CssFramework.Bootstrap_4 + - CssFramework.Bootstrap_5 + - CssFramework.Bootstrap_3 + - CssFramework.Materialize + - CssFramework.Bulma + +6. Add the CCS framework that you use to the **wwwroot/index.html** file -5. If you are using Boostrap 3.x you will also need this line in the **wwwroot/index.html** file: +7. If you are using Boostrap 3.x you will also need this line in the **wwwroot/index.html** file: ```html ``` - + +8. If you are using Materialize you will also need this line in the **wwwroot/index.html** file: + ```html + + ``` + +9. If you are using Bulma you will also need this line in the **wwwroot/index.html** file: + ```html + + ``` + [Quick start ->](Quick_start.md) \ No newline at end of file diff --git a/docs/blazor_grpc/Installation.md b/docs/blazor_grpc/Installation.md index e1553308..2b216c47 100644 --- a/docs/blazor_grpc/Installation.md +++ b/docs/blazor_grpc/Installation.md @@ -33,9 +33,32 @@ The **GridBlazor** component installation for gRPC is straightforward. Just foll These files will be loaded from the **GridBlazor** nuget package, so it is not necessary to copy it to you project. -6. If you are using Boostrap 3.x you will also need this line in the **wwwroot/index.html** file: +6. Add this line to the **Program.cs** file on the client project: + ```c# + builder.Services.AddGridBlazor(x => x.Style = CssFramework.Bootstrap_4); + ``` + You can select the CSS framework used in your project among the following: + - CssFramework.Bootstrap_4 + - CssFramework.Bootstrap_5 + - CssFramework.Bootstrap_3 + - CssFramework.Materialize + - CssFramework.Bulma + +7. Add the CCS framework that you use to the **wwwroot/index.html** file + +8. If you are using Boostrap 3.x you will also need this line in the **wwwroot/index.html** file: ```html ``` - + +9. If you are using Materialize you will also need this line in the **wwwroot/index.html** file: + ```html + + ``` + +10. If you are using Bulma you will also need this line in the **wwwroot/index.html** file: + ```html + + ``` + [Quick start ->](Quick_start.md) \ No newline at end of file diff --git a/docs/blazor_local/Installation.md b/docs/blazor_local/Installation.md index 1abef7bc..54e1d03d 100644 --- a/docs/blazor_local/Installation.md +++ b/docs/blazor_local/Installation.md @@ -18,9 +18,32 @@ The **GridBlazor** component installation is straightforward. Just follow these These files will be loaded from the **GridBlazor** nuget package, so it is not necessary to copy it to you project. -4. If you are using Boostrap 3.x you will also need this line in the **wwwroot/index.html** file: +4. Add this line to the **Program.cs** file on the client project: + ```c# + builder.Services.AddGridBlazor(x => x.Style = CssFramework.Bootstrap_4); + ``` + You can select the CSS framework used in your project among the following: + - CssFramework.Bootstrap_4 + - CssFramework.Bootstrap_5 + - CssFramework.Bootstrap_3 + - CssFramework.Materialize + - CssFramework.Bulma + +5. Add the CCS framework that you use to the **wwwroot/index.html** file + +6. If you are using Boostrap 3.x you will also need this line in the **wwwroot/index.html** file: ```html ``` + +7. If you are using Materialize you will also need this line in the **wwwroot/index.html** file: + ```html + + ``` + +8. If you are using Bulma you will also need this line in the **wwwroot/index.html** file: + ```html + + ``` [Quick start ->](Quick_start.md) \ No newline at end of file diff --git a/docs/blazor_odata/Installation.md b/docs/blazor_odata/Installation.md index ce1ed4c0..a3b3abce 100644 --- a/docs/blazor_odata/Installation.md +++ b/docs/blazor_odata/Installation.md @@ -8,7 +8,7 @@ The **GridBlazor** component installation is straightforward. Just follow these 1. Create a new Blazor client-side solution using the **Blazor WebAssembly App** template -2. Install the [**GridBlazor**](http://nuget.org/packages/GridBlazor/) nuget package v1.5.0 or lateron the client project. +2. Install the [**GridBlazor**](http://nuget.org/packages/GridBlazor/) nuget package v1.5.0 or later on the client project. 3. Install the [**Microsoft.AspNetCore.OData**](http://www.nuget.org/packages/Microsoft.AspNetCore.OData/) nuget package v7.4.0 or later on the server project. @@ -19,13 +19,36 @@ The **GridBlazor** component installation is straightforward. Just follow these ``` These files will be loaded from the **GridBlazor** nuget package, so it is not necessary to copy it to you project. +5. Add this line to the **Program.cs** file on the client project: + ```c# + builder.Services.AddGridBlazor(x => x.Style = CssFramework.Bootstrap_4); + ``` + You can select the CSS framework used in your project among the following: + - CssFramework.Bootstrap_4 + - CssFramework.Bootstrap_5 + - CssFramework.Bootstrap_3 + - CssFramework.Materialize + - CssFramework.Bulma + +6. Add the CCS framework that you use to the **wwwroot/index.html** file -5. If you are using Boostrap 3.x you will also need this line in the **wwwroot/index.html** file: +7. If you are using Boostrap 3.x you will also need this line in the **wwwroot/index.html** file: ```html ``` -6. Add the OData endpoints in **Startup.cs** file of the server project: +8. If you are using Materialize you will also need this line in the **wwwroot/index.html** file: + ```html + + ``` + +9. If you are using Bulma you will also need this line in the **wwwroot/index.html** file: + ```html + + ``` + + +10. Add the OData endpoints in **Startup.cs** file of the server project: ```c# app.UseEndpoints(endpoints => diff --git a/docs/blazor_server/Installation.md b/docs/blazor_server/Installation.md index efbe9aff..e117b56c 100644 --- a/docs/blazor_server/Installation.md +++ b/docs/blazor_server/Installation.md @@ -16,10 +16,33 @@ The **GridBlazor** component installation is straightforward. Just follow these ``` These files will be loaded from the **GridBlazor** nuget package, so it is not necessary to copy it to you project. - -4. If you are using Boostrap 3.x you will also need this line in the **_Host.cshtml** view or directly to the page: + +4. Add this line to the **Startup.cs** file: + ```c# + services.AddGridBlazor(x => x.Style = CssFramework.Bootstrap_4); + ``` + You can select the CSS framework used in your project among the following: + - CssFramework.Bootstrap_4 + - CssFramework.Bootstrap_5 + - CssFramework.Bootstrap_3 + - CssFramework.Materialize + - CssFramework.Bulma + +5. Add the CCS framework that you use to the **_Host.cshtml** file + +6. If you are using Boostrap 3.x you will also need this line in the **_Host.cshtml** file: ```html ``` + +7. If you are using Materialize you will also need this line in the **_Host.cshtml** file: + ```html + + ``` + +8. If you are using Bulma you will also need this line in the **_Host.cshtml** file: + ```html + + ``` [Quick start ->](Quick_start.md) \ No newline at end of file