Dynamic Fields

13 posts, 0 answers
  1. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 10 Jul 2012 Link to this post

    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?
  2. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 11 Jul 2012 Link to this post

    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...
  3. UI for WPF is Visual Studio 2017 Ready
  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 12 Jul 2012 Link to this post

    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 >>

  5. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 12 Jul 2012 Link to this post

    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.
  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 17 Jul 2012 Link to this post

    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.

  7. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 17 Jul 2012 Link to this post

    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.
  8. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 17 Jul 2012 Link to this post

    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.

  9. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 17 Jul 2012 Link to this post

    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?
  10. Stefan Dobrev
    Admin
    Stefan Dobrev avatar
    790 posts

    Posted 18 Jul 2012 Link to this post

    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.

  11. Zack
    Zack avatar
    112 posts
    Member since:
    Jun 2012

    Posted 18 Jul 2012 Link to this post

    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.
  12. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 20 Jul 2012 Link to this post

    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.

  13. Douw
    Douw avatar
    3 posts
    Member since:
    Jul 2012

    Posted 09 Mar 2015 in reply to Stefan Dobrev Link to this post

    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
  14. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 11 Mar 2015 Link to this post

    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.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready