Databinding Enum values to DataForm

4 posts, 0 answers
  1. Joe Brinkman
    Joe Brinkman avatar
    1 posts
    Member since:
    Dec 2005

    Posted 16 Jan 2013 Link to this post

      I am having some problems with getting Telerik dataforms to work correctly.  Everything seems fine, except that any field which is an Enum does not want to persist it's values back to the original entity.  So I can create new entities and edit existing entities, but the enum fields are uneditable.

    I have tried letting the data form auto create the fields, I have tried specifying the fields in XAML, I have tried using a simple viewmodel with auto-implemented fields and tried using a backing store with INotifyPropertyChanged events. 

    Nothing works.  The setter on the enum fields is just never called, although I can trace the setter on every other field getting called.

    Entity Code

    public class EventTile



            public string EventType { get; set; }

            public string Title { get; set; }

            public DateTime EventDate { get; set; }

            public TileSizeEnum TileSize { get; set; }

            public TileTypeEnum TileType { get; set; }


    Save Method on DetailsPage.xaml.cs

            private void Save_Click(object sender, EventArgs e)







    <telerikInput:RadDataForm x:Name="radDataForm" >


            <telerikInput:DataField TargetProperty="Title"/>

            <telerikInput:DataField TargetProperty="EventType"/>

            <telerikInput:DataField TargetProperty="EventDate"/>

            <telerikInput:DataField TargetProperty="TileSize"/>

            <telerikInput:DataField TargetProperty="TileType"/>



    In no case can I get the TileSize or TileType values to be updated correctly. Every other field works as expected. Any help would be appreciated.

  2. Deyan
    Deyan avatar
    2026 posts

    Posted 17 Jan 2013 Link to this post

    Hi Joe,

    Thanks for writing.

    We are using RadDataForm in a couple of our projects with very similar scenarios and we cannot reproduce the behavior that you describe.

    The first thing that comes to my mind is that if you have defined any type of validation that does not succeed, the Commit method will not store the editors' values to the corresponding properties. It seems that this behavior might be specific to your particular scenario and therefore we would kindly like to ask you to prepare a simple demo project that we can use to reproduce it and see what actually happens.

    Note that you will have to open a new support ticket in order to attach your project.

    the Telerik team
    Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
  3. DevCraft banner
  4. Oladipo
    Oladipo avatar
    2 posts
    Member since:
    Aug 2008

    Posted 23 Jan 2014 Link to this post

    Hi Joe,

    Did you finally resolve the issue?

    I also have the same issue binding an enum to the raddataform.

    The values selected are not being persisted to my currentitem backing model.

    Other non enum fields get persisted.

    Any updates?
  5. Deyan
    Deyan avatar
    2026 posts

    Posted 24 Jan 2014 Link to this post

    Hello Oladipo,

    Thanks for writing.

    We actually never managed to reproduce the problem on our side. Is it possible that you prepare a sample project and send it to us for further investigation?

    As soon as we are able to identify the issue and find the reason for it, we will make sure to issue a fix.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top