Using an API as a data source

Docs

In addition to connecting directly to the database you can use a list of typed objects from an API as a data source. In this example the grid control is created with a data source type of List and then given a list of Nobel prize winners generated from the following API end-point objects using the AddList method.

Razor
                                
                                        
DbNetGridCore nobelPrizeWinnersGrid = new DbNetGridCore(DataSourceType.List);
nobelPrizeWinnersGrid.AddList(Model.NobelPrizeLaureates);
nobelPrizeWinnersGrid.Column("*").Filter();
nobelPrizeWinnersGrid.Column(nameof(NobelPrizeLaureate.category)).Lookup().FilterMode(FilterMode.List);
@nobelPrizeWinnersGrid.Render()