Gridview Templates

  • Thread starter Thread starter Joe
  • Start date Start date
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
 
     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.
 
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,

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top