Multiple ParseChildren In Custom List Control

Is there a way to have multiple parse children in a custom list control?

Right now I am using :
[
ParseChildren(true, "MyControl_one")
]

I also need to have two other types of controls within the parent and have them parsed into seperate collections.
LVL 1
clickclickbangAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AGBrownCommented:
C,

Me again :-)

I think we are now on the last comment of my first post to your previous question (if that made sense) but correct me if I'm wrong (http:Q_21803140.html).

As I understand it, what you want to do is something like:

<myControl:TheControl>
      <myControl:Employee>1</myControl:Employee>
      <myControl:Employee>2</myControl:Employee>
      <myControl:Employee>3</myControl:Employee>
      <myControl:Employee>4</myControl:Employee>
      <myControl:Customer>1</myControl:Customer>
      <myControl:Customer>2</myControl:Customer>
      <myControl:Customer>3</myControl:Customer>
      <myControl:Customer>4</myControl:Customer>
</myControl:TheControl>

Unfortunately, the PersistenceMode.InnerDefaultProperty doesn't let you do this, you can only have a single collection property for InnerDefaultProperty persistence in a control. Instead you need to define two more controls, each of which have an innerDefaultProperty that takes a collection. These would then be used with InnerProperty persistence in the outer control:

<myControl:TheControl>
      <EmployeeControl>
            <myControl:Employee>1</myControl:Employee>
            <myControl:Employee>2</myControl:Employee>
            <myControl:Employee>3</myControl:Employee>
            <myControl:Employee>4</myControl:Employee>
      </EmployeeControl>
      <CustomerControl>
            <myControl:Customer>1</myControl:Customer>
            <myControl:Customer>2</myControl:Customer>
            <myControl:Customer>3</myControl:Customer>
            <myControl:Customer>4</myControl:Customer>
      </CustomerControl>
</myControl:TheControl>

Now, I could have completely misunderstood the question; let me know if this is completely off-course. If I have misunderstood, post some of your control code and corresponding html/aspx and I'll try again.

Andy

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
clickclickbangAuthor Commented:
Andy - Thanks for your continued support :) I came to that conclusion over the weekend and implmeneted the "sub" controls to house their respective children thus making the outer most control the GrandParent of the bunch. Your samples and insight allowed me to answer this one on my own after I posted the question, so double thanks!!!

I'm going to award the question as I think it stands up as a great PAQ.
AGBrownCommented:
Thanks! Glad its all working, it took me a while to work all this out for myself when I had to do it.

Andy
shapeshifter999Commented:
Hello,

Sorry to revive this thread.

Is there somewhere an example how to implement a subcontrol?

Thank you,
Have a great day!
Sébastien
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.