Mewriick / Blazor.FlexGrid

GridView component for Blazor
MIT License
199 stars 36 forks source link

add support for server side paging #8

Closed agonzalezm closed 6 years ago

agonzalezm commented 6 years ago

Could you add support for server side paging for large datasets?

Mewriick commented 6 years ago

Hello,

now for server side pagig you must implement ILazyDataSetLoader<> interface for service which fetch data. And in your page use LazyLoadedTableDataAdapter<>. I will think about better solution, but for now this is possible solution.

You can find these in ServerSide.App https://github.com/Mewriick/Blazor.FlexGrid/blob/master/demo/Blazor.FlexGrid.Demo.Serverside.App/Pages/LazyLoadedGrid.cshtml https://github.com/Mewriick/Blazor.FlexGrid/blob/master/demo/Blazor.FlexGrid.Demo.Serverside.App/Services/WeatherForecastService.cs

agonzalezm commented 6 years ago

ok, i will give this a try! thanks awesome control

agonzalezm commented 6 years ago

also instead of specifying number of rows to show per page, is there any way to configure the grid to expand to bottom of the page and occupy all possible space and then depending of the screen resolution it will show more or less rows and will do the paging according to that?

Mewriick commented 6 years ago

For now this is not possible and pagination only works with specified rows per page, but I will add some infinite scrolling functionality in future versions

Still lot of works front of me :)

agonzalezm commented 6 years ago

sure, thanks, keep the good work! I would also like to see:

  1. scroll inside the grid: now if you dont set a page size the grid expand to show all rows but the scroll is done at the page level, loosing the headers when you scroll down.
  2. client side filtering/search: like typing "search1" in textbox and filter gridview to show only rows that contain that search.
  3. Column header click to sort by that column.
  4. Column template to show an icon/imaged depending on the value enum/text of the column, not sure if this possible now but didnt find how to do.

Hope some of this is in your "roadmap" :)

Mewriick commented 6 years ago

Yes everything you sain is in my roadmap. My next step probably will be implementing filtering/serach feature.

The column sorting is even implemented, you only must configure that particular column can be sorted, by calling IsSortable on configuring Property in grid entity configuration.

For exmaple builder.Property(e => e.TemperatureF).IsSortable();