Create Fields in code behind

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

    Posted 11 Aug 2015 Link to this post

    Hi,

    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.

     

    Thanks

    Best Regards

    Rene

  2. Answer
    Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 11 Aug 2015 Link to this post

    Hello,

    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.

    Regards,
    Ivan Ivanov
    Telerik
    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
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top