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

Accessing to data returning public methods for previous defined classes

1 Answer 34 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
M
Top achievements
Rank 1
M asked on 12 Mar 2012, 11:16 AM
 
I am using q2 2011 telerik reporting for silverlight apps.
in access to data by object data source I can only access to properties of my main class(that defined by set and get) and I can not access to other public methos, why?I have a created class with some public method(c#) and no any property(set get ...) , when I connect to the "list" type class of this class I can not see the public methods but if I create a property(by set and get) I can see that properties! .Is any way for accessing to public methods? Thanks.

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 13 Mar 2012, 01:25 PM
Hello,

The ObjectDataSource Component works with objects and when you create it, you are asked where it will get the data from. You set it to point to a method, a property or a class. Afterwards when working with this ObjectDataSource, it only shows public properties because the methods are not part of an object.
If your methods retrieve objects that you want to use in the report, you can create User Functions that get these objects by a parameter for e.g and use them in the expression. Then instead of defining the value of the component like =Fields.FieldName it would be = MyUserFunction(Fields.ID). 

Regards,
Elian
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
Tags
General Discussions
Asked by
M
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or