Using fields with the GridView control
The GridView control is used to render an HTML table containing a list of data items. However, when the GridView controls renders its columns automatically, control over column formatting is lost. To maintain control over column formatting, following column field elements are used. Using these elements we can display DropDownLists or HyperLinks or Images in GridView columns.Note that these are the only fields which we can use in a GridView control.
Field | Description |
---|---|
asp:BoundField | Enables us to display the value of a data item in a data source as text |
asp:ButtonField | Enables us to display a button or the value of a data item as a button |
asp:CheckBoxField | Enables us to display the value of a data item as a check box |
asp:CommandField | Displays select, edit, delete, update or cancel buttons |
asp:HyperLinkField | Displays a hyperlink |
asp:ImageField | Displays an image |
asp:TemplateField | Enables customization of the appearance of a data item |
GridView Articles
- GridView AutoGenerateColumns property
- Bind GridView control with SqlDataSource control
- DataBinding in a GridView control
- Binding a GridView programmatically with dataset
- Binding a GridView programmatically with Generic List Collection
- Adding Boundfields to a GridView control
- Adding button fields to a GridView control
- Create Templatefields in a GridView control
- Access a value using SelectedIndexChanged() event when a row in a GridView is selected
- How to restrict an item from being selected using GridView SelectedIndexChanging Event
- How to add a new row in the GridView control by using the GridView footer template
- Gridview datakeynames
- How to select a particular row in a GridView control using SelectedDataKey method
- Formatting GridView control with CSS
- GridView rowDataBound event
Become an Expert
Learn More
Q1. What is Azure Platform?
GridView CommandField example
GridView and DetailsView Master/Detail page using SqlDataSource control
POCO overview and advantages - POCO class, Entity Framework in Enterprise Applications
Query entity data model using linq to entities
Difference between arraylist and list collection
How to create a Web service using Visual Studio.net
FormView DataBound Event
Calling base class constructor in C#
Convert a sequence to a generic list using ToList()method
ERP Software Development
Project ideas for students
Accounting Software
Creating an ASP.Net MVC 3 application
Using assemblies in .net applications
How to implement form validation using ASP.Net 2.0 Validation Controls
Constructors in Visual Basic.Net
GridView CommandField example
GridView and DetailsView Master/Detail page using SqlDataSource control
POCO overview and advantages - POCO class, Entity Framework in Enterprise Applications
Query entity data model using linq to entities
Difference between arraylist and list collection
How to create a Web service using Visual Studio.net
FormView DataBound Event
Calling base class constructor in C#
Convert a sequence to a generic list using ToList()method
ERP Software Development
Project ideas for students
Accounting Software
Creating an ASP.Net MVC 3 application
Using assemblies in .net applications
How to implement form validation using ASP.Net 2.0 Validation Controls
Constructors in Visual Basic.Net