Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to bind GridView with standard in-memory data sources (DataTable, List)

$
0
0

This example illustrate how to bind the MVC GridView Extension with the standard in-memory data sources:

- The ADO.NET DataTable - DataTableDataBinding View / DataTableDataBindingPartial Partial View;

- The Typed List (List<T>) - TypedListDataBinding View / TypedListDataBindingPartial Partial View.


The GridView's definition contains:

- Set of Data Columns whose values are retrieved from the underlying datasource (the /*Data-Bound Columns*/ section);

- A single Unbound Column (the /*Unbound Columns*/ section) whose values are computed based on the bound columns' values (the /*Unbound Column Calculating*/ section).


Both data sources (Models) have the same set of fields. These Models are defined within the /Models/Model code file.

See Also:
E3983: GridView - How to edit in memory data source
E3998: GridView - How to specify a custom EditForm Template

Question Comments

Added By: Lori Post at: 1/22/2013 7:43:28 AM    

How would this be done with an IQueryable datasource? I'm using the BindToLinq method to deal with large amounts of data. I need an in memory collection since I will be modifying items in an in memory collection based on updates to the list, and at the very end there will be a second page which will be a confirmation showing the changes in the grid and whether the user would like to continue with the changes.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>