Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavnavar committed Mar 21, 2022
1 parent 65df0e3 commit 60eae53
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/blazor_client/Quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ The steps to build a grid razor page using **GridBlazor** are:
* **T**: type of the model items
* **Grid**: grid object that has to be created in the **OnParametersSetAsync** method of the razor page

* You should use a **GridCoreServer** object in the server controller action.
* You should use a **GridCoreServer** object in the server controller action.

* You can use multiple methods of the **GridCoreServer** object to configure a grid on the server. For example:
```c#
Expand All @@ -145,6 +145,10 @@ The steps to build a grid razor page using **GridBlazor** are:

* The server action returns a json including the model rows to be shown on the grid and other information requirired for paging, etc. The object type returned by the action must be **ItemsDTO<T>**.

* You can use one of the following methods to get **ItemsDTO<T>** object:
* ```server.ItemsToDisplay``` returns the object using the standard ```ToList``` method of the ```IQueryable<T>``` object supplied by ```System.Linq``` package
* ```await server.GetItemsToDisplayAsync(Func<IQueryable<T>, Task<IList<T>>> toListAsync)``` returns the object using a custom```toListAsync``` method of the ```IQueryable<T>``` object. This method can be supplied by an ORM like EF Core. In this case we can call ```await server.GetItemsToDisplayAsync(async x => await x.ToListAsync())```

For more documentation about column options, please see: [Custom columns](Custom_columns.md).

[<- Installation](Installation.md) | [GridBlazor configuration ->](GridBlazor_configuration.md)
5 changes: 5 additions & 0 deletions docs/blazor_server/Quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ The steps to build a grid razor page using **GridBlazor** are:
.WithMultipleFilters();
```
* The method returns an object including the model rows to be shown on the grid and other information requirired for paging, etc. The object type returned by the action must be **ItemsDTO<T>**.

* You can use one of the following methods to get **ItemsDTO<T>** object:
* ```server.ItemsToDisplay``` returns the object using the standard ```ToList``` method of the ```IQueryable<T>``` object supplied by ```System.Linq``` package
* ```await server.GetItemsToDisplayAsync(Func<IQueryable<T>, Task<IList<T>>> toListAsync)``` returns the object using a custom```toListAsync``` method of the ```IQueryable<T>``` object. This method can be supplied by an ORM like EF Core. In this case we can call ```await server.GetItemsToDisplayAsync(async x => await x.ToListAsync())```


2. You have to register the service in the **Startup** class:

Expand Down
4 changes: 4 additions & 0 deletions docs/dotnetcore_blazor/Quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ The steps to build a grid razor page using **GridBlazor** are:
```
* The method returns an object including the model rows to be shown on the grid and other information requirired for paging, etc. The object type returned by the action must be **ItemsDTO<T>**.

* You can use one of the following methods to get **ItemsDTO<T>** object:
* ```server.ItemsToDisplay``` returns the object using the standard ```ToList``` method of the ```IQueryable<T>``` object supplied by ```System.Linq``` package
* ```await server.GetItemsToDisplayAsync(Func<IQueryable<T>, Task<IList<T>>> toListAsync)``` returns the object using a custom```toListAsync``` method of the ```IQueryable<T>``` object. This method can be supplied by an ORM like EF Core. In this case we can call ```await server.GetItemsToDisplayAsync(async x => await x.ToListAsync())```

2. You have to register the service in the **Startup** class:

```c#
Expand Down

0 comments on commit 60eae53

Please sign in to comment.