Groups | Blog | Home
all groups > asp.net datagrid control > july 2005 >

asp.net datagrid control : Please explain the difference



Alison
7/26/2005 7:35:56 PM
Hi all,

I'm still wet behind the ears about asp.net. One thing I need to
understand at the moment is the difference between the various ways of
displaying data in datagrid.

One way is,
<asp:BoundColumn DataField="last_name" HeaderText="Last
Name"></asp:BoundColumn>

And the other is,
<ItemTemplate> <%#Container.DataItem("court_name")%>
</ItemTemplate>

There must be a reason for this. What is it? Different capabilities?
What are the different capabilities?

Looking forward to be enlightened.
Eliyahu Goldin
7/27/2005 12:00:00 AM
You can put a lot of other things into ItemTemplate. You are much more
flexible with formatting. You can make your own layout for every item. In
your case, if all you need is just to show the column value with basing
formatting, BoundColumn is just fine.

Eliyahu

[quoted text, click to view]

AddThis Social Bookmark Button