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

Dynamic Fields

12 Answers 220 Views
ExpressionEditor
This is a migrated thread and some comments may be shown as answers.
Guru
Top achievements
Rank 2
Guru asked on 10 Jul 2012, 10:08 PM
Is it possible to take objectmodel and pass each objects "ID" property to an expressioneditor as a field? or maybe each column id in a datatable?

12 Answers, 1 is accepted

Sort by
0
Guru
Top achievements
Rank 2
answered on 11 Jul 2012, 05:12 PM
If I create a datatable and pass its first row to the expression editor it works, but the editor seems disabled... it shows the fields and shows their datatypes when selected but you cant enter or add text to the expressiontext field...
0
Dimitrina
Telerik team
answered on 12 Jul 2012, 03:48 PM
Hello,

 Have you tried working with the DefaultView of the DataTable and pass the first item of the DefaultView instead?

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Guru
Top achievements
Rank 2
answered on 12 Jul 2012, 04:42 PM
That gives me the same result, it seems to fully functioning as in you can click on ay constant or field and it shows info but you cannot get anything into the expressiontexxt field.
0
Dimitrina
Telerik team
answered on 17 Jul 2012, 08:00 AM
Hello,

We have checked the case in details and unfortunately you are right. Such a scenario is not supported. 

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Guru
Top achievements
Rank 2
answered on 17 Jul 2012, 02:44 PM
Ok so what is supported?
Documentation on this component is seriously lacking, it only shows it hooked up to a grid that uses an object model datasource... Doesn't really show any other uses...
I would like to see a end user guide too such as the datfilter has which was helpful.

Is it possible to pass this component anything other than a hard coded object model?
If so, please give an example... I have seen a few people out there attempting this and no solid answers to their problem.
0
Dimitrina
Telerik team
answered on 17 Jul 2012, 02:51 PM
Hello,

 What is supported are Objects with Properties. If you have set the Item for the ExpressionEditor to be an Object, you should have the field you would like to access defined as a Property in the class of the Object.

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Guru
Top achievements
Rank 2
answered on 17 Jul 2012, 03:49 PM
Can you say what kind of objects? any other than hard coded models?
I am dealing with unknown fields until runtime... can I use dynamic/expandos?
0
Stefan Dobrev
Telerik team
answered on 18 Jul 2012, 06:37 AM
Hi Zack,

Let me jump into this forum thread. My name is Stefan Dobrev and I'm the author of the RadExpressionEditor component and the expression engine behind it. You are absolutely right that the component lacks documentation and more user case scenario examples. We are sorry for this and will try to improve this one step at at time for the future.

Now onto your questions. Currently the expression engine supports only plain old CLR properties (including indexers as well). It does not support dynamic objects (via IDynamicMetaObjectProvider), nor DataTables /DataViews/ICustomTypeDescirptor. The underlying extensibility points are there, but we did not have enough resources to implement it for all scenarios. We will do this eventually in some of our next releases.

Until then I can suggest you to look at MicroModels framework for possible way to handle objects of dynamic shape. You can also look at Vladimir's lightweight DataTable (which also generates on the fly
CLR types with properties). Both solutions are for Silverlight, but can be compiled for WPF as well. Alternatively you can take a look into the Automapper framework for a general purpose solution.

Hope this helps,
Stefan Dobrev
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Guru
Top achievements
Rank 2
answered on 18 Jul 2012, 03:24 PM
Stefan,
I am impressed that the author of this component is joining this post, kudos! Let me just say, the component is a good idea and has great potential for our application and I look forward to implementing it. For now in test I will research and attempt your suggestions and post back my results. Thanks again for the good input straight from the source. I would imagine that it gets less attention than grids and combobox but it is a component of WPF suite and I would like to see it have at least and end-user guide and be a little friendlier with datatables or more generic objects most perople use... if possible.
0
Dimitrina
Telerik team
answered on 20 Jul 2012, 12:51 PM
Hi,

 Thank you for your feedback. The requested functionality is not in our immediate development plans but we will have shortly a discussion on its future additions.

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Douw
Top achievements
Rank 1
answered on 10 Mar 2015, 02:58 AM
Hi Stefan,

I require the same functionality to be able to bind to an ExpandoObject, do you have an ETA on when this will be available?

Regards,

Douw
0
Dimitrina
Telerik team
answered on 11 Mar 2015, 08:49 AM
Hi Douw,

For the time being we do not have any planned modifications on the control. RadExpressionEditor already provides support for dynamic objects with ICustomTypeProvider (.NET 4.5) or ICustomTypeDescriptor implementation. 
My suggestion would be to consider using ICustomTypeProvider instead.


Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ExpressionEditor
Asked by
Guru
Top achievements
Rank 2
Answers by
Guru
Top achievements
Rank 2
Dimitrina
Telerik team
Stefan Dobrev
Telerik team
Douw
Top achievements
Rank 1
Share this question
or