Auto Generate fields and complex types

3 posts, 1 answers
  1. Andrew
    Andrew avatar
    171 posts
    Member since:
    Jun 2009

    Posted 01 Jul 2011 Link to this post

    Is there a way to get the DataForm to display complex types when auto generating fileds?

  2. Answer
    Pavel Pavlov
    Pavel Pavlov avatar
    2039 posts

    Posted 05 Jul 2011 Link to this post

    Hello Andrew,

    Since RadDataForm does not know what kind of editor to  create for a complex type, you will need to use some custom code to prepare the editor inside the AutoGeneratingField event handler.

    The field is ContentControl and inside the handler you may replace the default textbox content  , with UI element by your choice.

    In case you have troubles implementing this , just send me a small project with your entities and I will implement the missing part regarding the DataForm field generation for the complex type for you .

    Pavel Pavlov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. Hai
    Hai avatar
    7 posts
    Member since:
    Sep 2010

    Posted 01 Dec 2011 Link to this post

    I have the same issue. But I can't find the ContentControl property in the AutoGeneratingFieldEventArgs. It has a DataField but its Content and ContentTemplate are both dull. Can you share a code snippet here? Thanks.
Back to Top