Use of Item Templates in a GridView to activate different Asp.net controls(Edit box, etc)

Posted on 2009-12-16
Medium Priority
Last Modified: 2012-05-08
Can someone in a nutshell describe Asp.net templated controls in a GridView control?
When I edit a GridView template in design view with the fly out menu, I see 5 different
types of Templates being listed.

Item Template
Edit Template
Alternating Item template
Header Template
Footer Template

Is the gist of it that you can have different controls in a GridView column, and then display/
activate those controls as needed?

For example suppose you have a column named "Status"; in that column for the Item Template you will have a label control.In the Footer Template for "Status" you will have an edit control.

 And then as deemed necessary you can display the edit control as needed instead of the label control in column status?

I can't find any good documentation on using Templated controls so a good homegrown explanation would work great or a good article on the web that someone could recommend. Anyway, I need help understanding how to take advantage of this great technology.
Question by:brgdotnet
1 Comment
LVL 14

Accepted Solution

jjardine earned 960 total points
ID: 26068676
have a look at this link.. I think it explains what you are asking:  http://www.asp.net/%28S%28ywiyuluxr3qb2dfva1z5lgeg%29%29/learn/data-access/tutorial-12-cs.aspx

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Suggested Courses
Course of the Month16 days, 11 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question