Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Hierarchical binding in a WebServer Control with templates

Reply
Thread Tools

Hierarchical binding in a WebServer Control with templates

 
 
Iain
Guest
Posts: n/a
 
      06-15-2004
I want to build a templated control which will be the graphical
representation of a complex object.

So the object has a list of items (line items on an order) and some items
can contain other items (specifically, some items can be custom CDs with
individual tracks on).

So I when I come to render I want to bind to the object and enumerate
through the collection. But when I come to an item which contains other
items I want to use a different set of templates, specifically with
templates for each sub item.

I sort of understand templated databinding, but I'm struggling with the
relationship between CreateControls and Render on this one.

Any advice out there?

Iain


 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      06-15-2004
"Iain" <> wrote in message
news:...
> I want to build a templated control which will be the graphical
> representation of a complex object.
>
> So the object has a list of items (line items on an order) and some items
> can contain other items (specifically, some items can be custom CDs with
> individual tracks on).
>
> So I when I come to render I want to bind to the object and enumerate
> through the collection. But when I come to an item which contains other
> items I want to use a different set of templates, specifically with
> templates for each sub item.
>
> I sort of understand templated databinding, but I'm struggling with the
> relationship between CreateControls and Render on this one.
>
> Any advice out there?


Sure, you could have a template for an item and one for subitems. If
necessary, you could have a template for each kind of subitem. Just add an
ITemplate property for each possible kind of subitem.
--
John Saunders
johnwsaundersiii at hotmail


 
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
Hierarchical control with check boxes? Olav ASP .Net 2 08-25-2007 11:02 PM
how to Specializations of function Templates or Overloading Function templates with Templates ? recover C++ 2 07-25-2006 02:55 AM
Binding to Hierarchical Data Source (FAQs) Kent Boogaart ASP .Net 5 02-02-2006 04:55 PM
Templates templates templates JKop C++ 3 07-21-2004 11:44 AM
Binding hierarchical data neverstill ASP .Net 3 12-09-2003 08:16 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57