Gridview Templates

J

Joe

ASP.NET newbie here.

I have a gridview and when I go to the smart tag for template
editing, it shows me only two templates - the EmptyData template and
the Pager template.

Aren't there supposed to be more templates? Like an Item
Template?


J
 
G

Guest

     ASP.NET newbie here.

     I have a gridview and when I go to the smart tag for template
editing, it shows me only two templates - the EmptyData template and
the Pager template.

     Aren't there supposed to be more templates?   Like an Item
Template?

J

Hi Joe,

you should see Columns property in the list. This is where you can
define more templates like TemplateField and so on. The
EmptyDataTemplate is out of columns scope, because it can define a
template without columns for the empty data row displayed when a
GridView control is bound to a data source that does not contain any
records.

See more examples about GridView

GridView Examples for ASP.NET 2.0
http://msdn.microsoft.com/en-us/library/aa479339.aspx
ASP.NET Quickstart Tutorials
http://quickstarts.asp.net/quickstartv20/aspnet/doc/ctrlref/data/gridview.aspx

Hope this helps.
 
G

Gregory A. Beamer

I have a gridview and when I go to the smart tag for template
editing, it shows me only two templates - the EmptyData template and
the Pager template.

Aren't there supposed to be more templates? Like an Item
Template?

In hte visual designer, the other types of templates are controlled through
columns. If you want to see ItemTemplate, etc, then you go to the tags
themselves. This si not necessary, in most cases, as editing the columns
manually will create these templates for you.

Peace and Grace,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top