MVC: Grid

Leveraging the MVC Grid to quickly display sortable, paging data.

MVC provides robust data controls for displaying data sets.
These grids come with many customizable features and require very little coding.

To illustrate this feature, I’ll begin a Model for Sales Associates.

Next, I’ll create a Controller which seeds a collection with several new sales associates.
All that’s left is to create a View to display my Grid.
Notice how little code is needed to configure a grid for display.
All that I’ve done is instantiate a new grid, set the source to pull from my Model, set it to sort by the lname field, and display 4 records per page.

3-mvc-grid

Upon executing the controller, I see all the records displayed in a grid which has sorting and paging capabilities.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s