This is a migrated thread and some comments may be shown as answers.

Create Fields in code behind

1 Answer 62 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
ITA
Top achievements
Rank 1
ITA asked on 11 Aug 2015, 07:25 AM

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

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Ivanov
Telerik team
answered on 11 Aug 2015, 11:57 AM
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
Tags
DataForm
Asked by
ITA
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Share this question
or