Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > Can't seem to bind data in a header or footer of a datalist.

Reply
Thread Tools

Can't seem to bind data in a header or footer of a datalist.

 
 
UJ
Guest
Posts: n/a
 
      10-03-2006
I'm trying to bind data in a header list and it doesn't appear to work. My
code is:


<aspataList id="dgOurSolutionArray" runat="server"
RepeatDirection="Horizontal" RepeatColumns="4">
<HeaderTemplate>Fred
<%# DataBinder.Eval(Container.DataItem, "ShortDescription") %>
</HeaderTemplate>
<FooterTemplate>
<%# DataBinder.Eval(Container.DataItem, "SolutionID") %>
</FooterTemplate>
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "ShortDescription") %>
</ItemTemplate>
</aspataList>


I get my short description once, and Fred at the top. No matter what I put
in for the header/footer for DataElements, it doesn't seem to show up.

Any ideas?

TIA - Jeff.



 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      10-03-2006
The HeaderTemplate and FooterTemplate aren't designed for repeating data the
way ItemTemplate is.

What is it that you're trying to accomplish?

Ken
Microsoft MVP [ASP.NET]

"UJ" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm trying to bind data in a header list and it doesn't appear to work. My
> code is:
>
>
> <aspataList id="dgOurSolutionArray" runat="server"
> RepeatDirection="Horizontal" RepeatColumns="4">
> <HeaderTemplate>Fred
> <%# DataBinder.Eval(Container.DataItem, "ShortDescription") %>
> </HeaderTemplate>
> <FooterTemplate>
> <%# DataBinder.Eval(Container.DataItem, "SolutionID") %>
> </FooterTemplate>
> <ItemTemplate>
> <%# DataBinder.Eval(Container.DataItem, "ShortDescription") %>
> </ItemTemplate>
> </aspataList>
>
>
> I get my short description once, and Fred at the top. No matter what I put
> in for the header/footer for DataElements, it doesn't seem to show up.
>
> Any ideas?
>
> TIA - Jeff.
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Header files with "header.h" or <header.h> ?? mlt C++ 2 01-31-2009 02:54 PM
how to bind data to datagrid header template on button click event Santosh ASP .Net 0 08-02-2006 05:21 AM
Any way to reorder how a datagrid is drawn (header/footer/items vs.header/items/footer)? Henrik ASP .Net Datagrid Control 1 07-06-2006 12:23 AM
How to bind data from database to the header template of Datagrid Santosh ASP .Net 2 06-09-2006 11:55 AM
Using a data-bind dropdownlist to populate another data-bind dropdownlist mr2_93 ASP .Net 1 10-02-2005 05:07 PM



Advertisments