AspNetAtoms.com daily updates on ASP.NET Tutorials, Articles, Authors and more. Subscribe to our newsletter and receive updates on ASP.NET resources on the Internet.

Categories

Recent Posts

Using TemplateFields in the GridView Control : Scott Mitchell

Wednesday, August 20 2008

To provide flexibility, the GridView offers the TemplateField, which renders using a template. A template can include a mix of static HTML, Web controls, and databinding syntax. In this tutorial we'll examine how to use the TemplateField to achieve a greater degree of customization with the GridView control. The GridView is composed of a set of fields that indicate what properties from the DataSource are to be included in the rendered output along with how the data will be displayed. The simplest field type is the BoundField, which displays a data value as text. Other field types display the data using alternate HTML elements. The CheckBoxField, for example, renders as a checkbox whose checked state depends on the value of a specified data field; the ImageField renders an image whose image source is based upon a specified data field. Hyperlinks and buttons whose state depends on an underlying data field value can be rendered using the HyperLinkField and ButtonField field types....

Read More:
Using TemplateFields in the GridView Control : Scott Mitchell
Also See:
Make Your ASP.NET Mobile Forms Timer-Refresh and Autoredirect : Peter Bromberg
Client Callback in a Website Registration Page : Omer Kamal
ASP.NET Web Controls for the Yahoo! User Interface Library : Luke Foust
Working with Callback and Control Rendering (Manually) : Muhammad Adnan Amanullah
A Navigation System Comes Easily : Xun Ding

Post your comment

Comment