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

Auto-generate columns in DataForm

1 Answer 91 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Terry
Top achievements
Rank 1
Terry asked on 16 Dec 2014, 07:56 PM
Is it possible to auto-generate columns in a DataForm? In my application, I don't know which fields to bind until runtime. I not only need to be able to auto-generate fields but also loop through these fields and specify which of the fields is editable. I'd hate to resort to a DetailsView control to do this.

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 19 Dec 2014, 03:45 PM
Hello Terry,

With the current implementation of RadDataForm, there is no functionality for auto-generating editors dynamically. The only supported scenario is by defining the LayoutTemplate, ItemTemplate, EditItemTemplate and InsertItemTemplate.

If you have limited amount of options for the data source you can define those templates in the code-behind for each data source and create the RadDataForm programmatically with the corresponding to the data source templates. However, this will be a highly complex task and I could recommend it.

You should consider using one of our controls that have auto-generate functionality - RadGrid or RadTreeList for example.


Best Regards,
Konstantin Dikov
Telerik
Tags
DataForm
Asked by
Terry
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or