jwite2003
07-02-2003, 09:37 PM
Hi,
I have a Webform where I'd like to display a datalist for each category in a users inventory. I'm trying to set the HeaderTemplate = category name and the ItemTemplate = the specific inventory items.... ie) Fruit->apples, oranges, pears. I'm letting the user set up their own category structures, so I'm trying to create these datalists in the code behind and then adding them to a panel control. For the inventory items I used the Page.LoadTemplate() function and databound the text property with <%# DataBinder.Eval(Container, "DataItem.ItemName") %>. This part works just fine. The problem occurs when I try to databind the HeaderTemplate using a similar method... I found this post in google groups:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=9b13ed39.0303281735.19338ce3%40posting.google.com&rnum=4&prev=/groups%3Fq%3D%252Bdatalist%2B%252Bheadertemplate%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D9b13ed39.0303281735.19338ce3%2540posting.google.com%26rnum%3D4
explaining why it doesn't work the same, but haven't found any posts yet on how it does work... Any help would be appreciated...
Thanks,
I have a Webform where I'd like to display a datalist for each category in a users inventory. I'm trying to set the HeaderTemplate = category name and the ItemTemplate = the specific inventory items.... ie) Fruit->apples, oranges, pears. I'm letting the user set up their own category structures, so I'm trying to create these datalists in the code behind and then adding them to a panel control. For the inventory items I used the Page.LoadTemplate() function and databound the text property with <%# DataBinder.Eval(Container, "DataItem.ItemName") %>. This part works just fine. The problem occurs when I try to databind the HeaderTemplate using a similar method... I found this post in google groups:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=9b13ed39.0303281735.19338ce3%40posting.google.com&rnum=4&prev=/groups%3Fq%3D%252Bdatalist%2B%252Bheadertemplate%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D9b13ed39.0303281735.19338ce3%2540posting.google.com%26rnum%3D4
explaining why it doesn't work the same, but haven't found any posts yet on how it does work... Any help would be appreciated...
Thanks,