What is the main difference between GridView / DetailsView / FormView and ASP.net?

What are the similarities and differences between GridView, DetailView, FormView?

What are the usage scenarios when will you use each of these controls and why?

+6
gridview detailsview
source share
7 answers

GridView shows them all as an HTML table. If you press a key in a row, the DetailView will display the details for the row in a separate space. If you need to insert a new row, FormView will also appear in a separate space.

+1
source share

Formview is designed to insert / update / view one record.

DetailsView is designed to display a single record with additional support for paging and navigation.

GridView is primarily intended for displaying / updating several records. He considered replacing a DataGrid control from .NET 1.1.

+12
source share

Ok, I read the ASP.Net QuickStart tutorials that give a good overview of each control:

ASP.NET Quickstart Tutorials

If you are showing β€œtabular” data, you are probably going to use DetailView, as it is for the relationship between parts and parts and has a built-in visualizer (FormsView does not)

+5
source share

The data presentation form is related to user interface control, but viewing the information has an assembly in table rendering

0
source share

GridView supports editing. You can use the edit , update , delete commands in ButtonField , ImageButton , Hyperlink , etc. Used as a template. In addition, if we specify the autogenerate deletebutton , autogenerate editbutton properties of the GridView , it will add columns for it.

0
source share

Form view: controlling the form view allows us to view one record at a time. And we can customize the page depending on your requirement and more control over the layout.

Details View: Details View also view one record at a time. And the details will present the result as an HTML table.

0
source share

Gridview is used to view only data, we cannot make any changes (editing or pasting is not possible).

Dataview is used to view, edit or insert data. dataview has built-in table rendering. It will generate them for you in the direct upper and lower list without the ability to move them to make them more convenient for the user.

In formview, you can position the element wherever you want on the page. This means that formview provides a user definition template for rendering it.

-one
source share

All Articles