I can expand the group to access its underlying data rows and Rows that belong to one group can be displayed on different pages. So, I'll drag the "Discontinued" column here and all the records are grouped by this column. At the top of the grid, you can see the group panel that allow us to drag and drop columns onto it. If I want to find products with names beginning in "Ch", I can just type "ch" here and easily display the matching records. As you can see, the grid view appears and I can navigate through the pages using the built-in pager. Now, Let's take a look at the result in browser. In the output window I can see what files have been changed or created.
#MVC DEVEXPRESS GRIDVIEW CODE#
You can see that the view code had been changed. I click "Insert" and the Insert Extension Wizard generates all the necessary code for me. The "Additional Settings" section allows me to define whether or not to display a pager, group panel, or filter row. In the "Data Model" section I select the automatically generated data model class, the Entity Framework data context class, the columns I want to display, and the key field name. It also allows me to generate actions that handle callbacks related to creating, reading, updating, and deleting records within the GridView. The wizard allows me to define the extension name and its partial view name. I navigate to "data" and select the GridView. Let’s select the "Insert DevExpress MVC Extension" item from the context menu and The Insert Extension Wizard opens. In the View, I right-click the position where I want to insert the DevExpress MVC GridView extension. Now, Let's insert the GridView Extension to the View. I don't want to edit the data model, so I save it, build the solution and close the designer. Select "Generate from database", click "Next", define a new connection, click "Next", and select the required table and click "Finish". I add an "ADO.NET Entity Data Model" to the "Models" folder. First, I'll add a data Model which I will later bind to a DevExpress MVC GridView extension. Here you can see that the content area is empty. Let's run this and see what it looks like in the browser. I have an MVC project here with a HomeController and an empty Index view. Starting from adding the extension into the project and binding it to data to diving deeper into the overview of its settings. In this video we'll cover all the basics of customizing the ASP.NET MVC GridView extension.