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

using Methods in Fields with parameters, not only Properties

1 Answer 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Steffen
Top achievements
Rank 1
Steffen asked on 27 Mar 2013, 01:41 PM
using "object Data Source", object not only have properties, but useful methods too..
(i do not want user functions!!)

InnerBoundaries is a public property
=Fields.InnerBoundaries.Count
 
=> works fine
 
Boundaries is a public method
=Fields.Boundaries("Inner").Count
 
=> incorrect usage of Fields object

this would be fine
=Methods.Boundaries("Inner").Count

Is it possible to use a Field fo a method like a MethodNode ?

1 Answer, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 01 Apr 2013, 08:39 AM
Hello Steffen,

It is not possible to use the ObjectDataSource the way you are trying to do it since it is designed only for data retrieval. This means that any methods can only be used for data retrieval and cannot be executed. If you have objects that besides data have methods (please have in mind that this is not considered good practice) and you need to use them the best way would be to wrap them in user functions. You can also wrap them in properties (so that they get executed), but in that case the methods will not be able to receive parameters.

Since you do not want to use user functions it will be best if you are able to share with us your exact reasons for avoiding them so that we are able to advise you more accordingly.

Greetings,
IvanY
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

Tags
General Discussions
Asked by
Steffen
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Share this question
or