Frequently, we need to encapsulate the way data is obtained, to make the UI independent from the source from which data is obtained, and achieve good loading performance. This can be done in GeneXus using the Data Provider object.
|
Data Provider |
With K2BTools we can easily use a Data Provider to load grids. To do so, Web Panel Designer provides the action Add Grid from Data Provider or Add Grid from Procedure to automatically create a grid.
|
Add Grid From Data Provider action |
In this case we will create a product grid that will display how much each product was sold. In our KB we have an object called ProductsDataProvider that will be loaded with a ProductSDT object that is also included in our KB.
|
ProductSDT structure |
|
ProductsDataProvider definition |
|