Please explain the difference

A

Alison

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.
 
E

Eliyahu Goldin

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
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top