Class with indexed property

11 posts, 0 answers
  1. Nohinn
    Nohinn avatar
    167 posts
    Member since:
    Feb 2011

    Posted 02 May 2011 Link to this post

    Is there any chance to make the expression editor work with a class that it's properties are stored in a dictionary accessible through indexed properties?
  2. Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 03 May 2011 Link to this post

    Hi Nohinn,

     Could you please elaborate on your question?

     RadExpressionEditor can parse access to indexers in the following form - propertyName[indexerKey].

    Greetings,
    Yavor Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Nohinn
    Nohinn avatar
    167 posts
    Member since:
    Feb 2011

    Posted 03 May 2011 Link to this post

    yeah I have tried that.
    But what I want to know is if it would be possible to just have the existing keys as fields like if they were properties of the item that uses the expression editor.
    And then just writing

    "Property1 > 0"

    Would look inside the dictionary for that key, get the value and check if it is greater than 0 for example.
    Because the user doesn't have any info about what name I used in code for the dictionary property.
  5. Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 03 May 2011 Link to this post

    Hello Nohinn,
     
     I'm sorry, but we don't plan on supporting such scenarios internally. We do, however, plan on supporting dynamic types (e.g. ExpandoObject), which I believe can work with your scenario.

    Regards,
    Yavor Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Denis Vuyka
    Denis Vuyka avatar
    39 posts
    Member since:
    Oct 2009

    Posted 07 Jun 2011 Link to this post

    Hello,
    What is the state of DynamicObject support?
    Thanks in advance,
    Denis
  7. Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 07 Jun 2011 Link to this post

    Hi Denis,

     Thank you for your interest in RadExpressionEditor.

     We will introduce support for binding to dynamic objects in RadGridView with our next release, which is expected in mid-July. Unfortunately, tight deadlines preclude us from enabling dynamics support in RadExpressionEditor in this release, but this feature is on our internal roadmap and will be introduced in a subsequent release.

    All the best,
    Yavor Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Denis Vuyka
    Denis Vuyka avatar
    39 posts
    Member since:
    Oct 2009

    Posted 07 Jun 2011 Link to this post

    Hi Yavor,
    Thanks for the quick reply. The control is great and we already have variety of scenarios where it fits and saves us a lot of time. 
    Denis
  9. Nathaniel
    Nathaniel avatar
    68 posts
    Member since:
    Nov 2010

    Posted 07 Nov 2011 Link to this post

    When might we see enabling dynamics support in RadExpressionEditor?
  10. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 10 Nov 2011 Link to this post

    Hi,

     We will do our best to include this in the first service pack of our upcoming Q3 2011 release. 

    Kind regards,
    Vlad
    the Telerik team

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

  11. KJ
    KJ avatar
    2 posts
    Member since:
    Jan 2014

    Posted 04 Jun 2014 in reply to Yavor Georgiev Link to this post

    Could you provide a sample? I can't get indexed properties to work, I've tried several types, i.e. List, Dictionary.

    In the online example I tried the expression "Discontinued.ToString().ToCharArray()[0]". This gives a blank preview, while i was expecting "T" or "F", from the boolean value it started with.
    Up until the index at the end it gives the expected result, the result of ToString() of the last part of the expression.

    Thank you.

  12. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 05 Jun 2014 Link to this post

    Hello,

    You could actually access the first char like so:
    Discontinued.ToString().ToCharArray().ElementAt(0)

    I hope this helps.

    Regards,
    Didie
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
DevCraft banner