This is a migrated thread and some comments may be shown as answers.

RadItem EnsureChildElements

4 Answers 79 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Antonis
Top achievements
Rank 1
Antonis asked on 05 Nov 2009, 07:05 PM
In Q2 version there was an EnsureChildElements method for the RadItem.
After I updated my project to Q3 version this method cannot be found and I get an error.

Any ideas?

Thanks in advance

4 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 06 Nov 2009, 08:09 AM
Hi Antonis,

Thank you for your question.

This is actually related to the new life cycle, introduced in RadElement. Child element creation is now straight forward and happens in the constructor of each element, that is why we have removed the EnsureChildElements method as it is no longer needed. Still, the CreateChildElements method is doing exactly what it was doing in Q2, so there should not be any problem if you simply remove the call to the EnsureChildElements method.

You can find more information in this blog post. The CreateChildElements is called during the Constructing state of the element.

I hope this helps. Do not hesitate to contact us if you have other questions.

Regards,
Georgi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Antonis
Top achievements
Rank 1
answered on 06 Nov 2009, 10:16 AM
Hi Georgi,
Thanks for your answer. I would like to tell me what happens when there is an overriding CreateChildren sub. In my case it seems that the New sub of the element is being called AFTER the CreateChildren sub and so if the element has a collection of items they are not initialized and thus I get an error.

Thanks for your time
0
gmendez
Top achievements
Rank 1
answered on 06 Nov 2009, 02:03 PM
Hello Georgi,

Even I'm getting lots of troubles with the latest release, I followed your recomendations for this case and it worked Ok.
The help shoud be updated with this change.
Regards,

Gonzalo
0
Georgi
Telerik team
answered on 11 Nov 2009, 12:39 PM
Hi Antonis,

Could you please send me a sample project that demonstrates the problems you are experiencing so that I can help you further?

Thank you in advance.


Greetings,
Georgi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Antonis
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Antonis
Top achievements
Rank 1
gmendez
Top achievements
Rank 1
Share this question
or