Grids
Example of List Binding in ASP.NET Core Data Grid Control
This sample demonstrates the way of data binding Grid component with List object(list binding data source).
Order ID | Customer Name | Order Date | Freight | Shipped Date | Ship Country |
---|---|---|---|---|---|
10001 | ALFKI | 5/15/1991 | $2.30 | 7/16/1996 | Denmark |
10002 | ANATR | 4/4/1990 | $3.30 | 9/11/1996 | Brazil |
10003 | ANTON | 11/30/1957 | $4.30 | 10/7/1996 | Germany |
10004 | BLONP | 10/22/1930 | $5.30 | 12/30/1996 | Austria |
10005 | BOLID | 2/18/1953 | $6.30 | 12/3/1997 | Switzerland |
10006 | ALFKI | 5/15/1991 | $4.60 | 7/16/1996 | Denmark |
10007 | ANATR | 4/4/1990 | $6.60 | 9/11/1996 | Brazil |
10008 | ANTON | 11/30/1957 | $8.60 | 10/7/1996 | Germany |
10009 | BLONP | 10/22/1930 | $10.60 | 12/30/1996 | Austria |
10010 | BOLID | 2/18/1953 | $12.60 | 12/3/1997 | Switzerland |
10011 | ALFKI | 5/15/1991 | $6.90 | 7/16/1996 | Denmark |
10012 | ANATR | 4/4/1990 | $9.90 | 9/11/1996 | Brazil |
The Grid supports data binding. The dataSource
property can be assigned either with the list of
objects or instance of DataManager
.
In this demo, the list of objects is assigned as the data source to the Grid.