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

ChildElement property now obsolete

2 Answers 154 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chuck Harrington
Top achievements
Rank 1
Chuck Harrington asked on 14 Nov 2012, 08:40 PM
I tried to convert my code to the recommended "ElementTreeHelper.GetChildElements method, however the Report Processing GroupSection does not have this object.  What is the correct way to do this?  I have searched forums but no satisfactory answer.  Here is my code.
Imports Processing = Telerik.Reporting.Processing
 
Dim section As Processing.GroupSection = DirectCast(sender, Processing.GroupSection)
Dim dataobject As Processing.IDataObject = DirectCast(section.DataObject, Processing.IDataObject)
 Dim txtbxSumV48 = DirectCast(section.ChildElements.Find("txtSumV48", True)(0), Telerik.Reporting.Processing.TextBox)

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 16 Nov 2012, 02:07 PM
Hi Chuck,

The code should be changed as follows:

Imports Processing = Telerik.Reporting.Processing
....
Dim section As Processing.GroupSection = DirectCast(sender, Processing.GroupSection)
Dim dataobject As Processing.IDataObject = DirectCast(section.DataObject, Processing.IDataObject)
Dim txtbxSumV48 = DirectCast(Processing.ElementTreeHelper.GetChildByName(section, "txtSumV48"), Telerik.Reporting.Processing.TextBox)
....

For more information refer to ElementTreeHelper Methods and specifically GetChildByName Method.

All the best,
Steve
the Telerik team

HAPPY WITH TELERIK REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Chuck Harrington
Top achievements
Rank 1
answered on 16 Nov 2012, 05:31 PM
Thanks Steve.  That worked perfectly, plus got rid of 100 warning messages in VS.
Tags
General Discussions
Asked by
Chuck Harrington
Top achievements
Rank 1
Answers by
Steve
Telerik team
Chuck Harrington
Top achievements
Rank 1
Share this question
or