Create Fields in code behind

2 posts, 1 answers
  1. ITA
    ITA avatar
    384 posts
    Member since:
    Aug 2009

    Posted 11 Aug 2015 Link to this post


    i love the DataForm Control, but is there a way to create the Fields and Layout in Codebehind? We want to create somethinfg like a Form-Designer,
    where the user can ​layout the form himself. First Step is to read from a File which fields, position, length,... and 2 Step is to create the field on the form.



    Best Regards


  2. Answer
    Ivan Ivanov
    Ivan Ivanov avatar
    1201 posts

    Posted 11 Aug 2015 Link to this post


    RadDataForm is designed to work either with Auto-generated fields, or manually defined DataTemplates that can contain such fields. You can solve this task by using some code-behind logic that constructs DataTemplates at run-time. WPF provides two alternative approaches to achieving this. You can either use the FrameworkElementFactory class, or you can load the DataTemplate from XAML strings with XamlReader.Load.

    Ivan Ivanov
    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 Feedback Portal and vote to affect the priority of the items
Back to Top