Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavnavar committed Nov 14, 2024
1 parent 3d07542 commit 2bcfe84
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 22 deletions.
3 changes: 3 additions & 0 deletions GridBlazorGrpc.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -29,6 +30,8 @@ public static async Task Main(string[] args)
builder.Services.AddScoped<ICrudFileService<Employee>, EmployeeFileService>();
builder.Services.AddLocalization();

builder.Services.AddGridBlazor(x => x.Style = CssFramework.Bootstrap_4);

var host = builder.Build();
var jsInterop = host.Services.GetRequiredService<IJSRuntime>();
var result = await jsInterop.InvokeAsync<string>("blazorCulture.get");
Expand Down
3 changes: 3 additions & 0 deletions GridBlazorJava/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Globalization;
using System.Net.Http;
using System.Threading.Tasks;
using GridShared.Style;

namespace GridBlazorJava
{
Expand All @@ -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<IJSRuntime>();
var result = await jsInterop.InvokeAsync<string>("blazorCulture.get");
Expand Down
8 changes: 0 additions & 8 deletions GridBlazorServerSide/Program.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
4 changes: 4 additions & 0 deletions GridBlazorServerSide/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using GridBlazor;
using GridBlazorServerSide.Data;
using GridBlazorServerSide.Services;
using Microsoft.AspNetCore.Builder;
Expand All @@ -10,6 +11,7 @@
using System.Collections.Generic;
using System.Globalization;
using GridShared.Data;
using GridShared.Style;

namespace GridBlazorServerSide
{
Expand All @@ -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();
Expand Down
5 changes: 3 additions & 2 deletions GridBlazorStandalone/Program.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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<IJSRuntime>();
var result = await jsInterop.InvokeAsync<string>("blazorCulture.get");
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
26 changes: 24 additions & 2 deletions docs/blazor_client/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<link href="~/_content/GridBlazor/css/gridblazor-bootstrap3.min.css" rel="stylesheet" />
```


8. If you are using Materialize you will also need this line in the **wwwroot/index.html** file:
```html
<link href="~/_content/GridBlazor/css/gridblazor-materialize.min.css" rel="stylesheet" />
```

9. If you are using Bulma you will also need this line in the **wwwroot/index.html** file:
```html
<link href="~/_content/GridBlazor/css/gridblazor-bulma.min.css" rel="stylesheet" />
```

[Quick start ->](Quick_start.md)
27 changes: 25 additions & 2 deletions docs/blazor_grpc/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<link href="~/_content/GridBlazor/css/gridblazor-bootstrap3.min.css" rel="stylesheet" />
```


9. If you are using Materialize you will also need this line in the **wwwroot/index.html** file:
```html
<link href="~/_content/GridBlazor/css/gridblazor-materialize.min.css" rel="stylesheet" />
```

10. If you are using Bulma you will also need this line in the **wwwroot/index.html** file:
```html
<link href="~/_content/GridBlazor/css/gridblazor-bulma.min.css" rel="stylesheet" />
```

[Quick start ->](Quick_start.md)
25 changes: 24 additions & 1 deletion docs/blazor_local/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<link href="~/_content/GridBlazor/css/gridblazor-bootstrap3.min.css" rel="stylesheet" />
```

7. If you are using Materialize you will also need this line in the **wwwroot/index.html** file:
```html
<link href="~/_content/GridBlazor/css/gridblazor-materialize.min.css" rel="stylesheet" />
```

8. If you are using Bulma you will also need this line in the **wwwroot/index.html** file:
```html
<link href="~/_content/GridBlazor/css/gridblazor-bulma.min.css" rel="stylesheet" />
```

[Quick start ->](Quick_start.md)
29 changes: 26 additions & 3 deletions docs/blazor_odata/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
<link href="~/_content/GridBlazor/css/gridblazor-bootstrap3.min.css" rel="stylesheet" />
```

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
<link href="~/_content/GridBlazor/css/gridblazor-materialize.min.css" rel="stylesheet" />
```

9. If you are using Bulma you will also need this line in the **wwwroot/index.html** file:
```html
<link href="~/_content/GridBlazor/css/gridblazor-bulma.min.css" rel="stylesheet" />
```


10. Add the OData endpoints in **Startup.cs** file of the server project:

```c#
app.UseEndpoints(endpoints =>
Expand Down
27 changes: 25 additions & 2 deletions docs/blazor_server/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,33 @@ The **GridBlazor** component installation is straightforward. Just follow these
<script src="_content/GridBlazor/js/gridblazor.js"></script>
```
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
<link href="~/_content/GridBlazor/css/gridblazor-bootstrap3.min.css" rel="stylesheet" />
```

7. If you are using Materialize you will also need this line in the **_Host.cshtml** file:
```html
<link href="~/_content/GridBlazor/css/gridblazor-materialize.min.css" rel="stylesheet" />
```

8. If you are using Bulma you will also need this line in the **_Host.cshtml** file:
```html
<link href="~/_content/GridBlazor/css/gridblazor-bulma.min.css" rel="stylesheet" />
```

[Quick start ->](Quick_start.md)

0 comments on commit 2bcfe84

Please sign in to comment.