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

AutoGeneration And Templates

1 Answer 121 Views
Form
This is a migrated thread and some comments may be shown as answers.
Timothy J
Top achievements
Rank 2
Bronze
Iron
Iron
Timothy J asked on 09 Apr 2021, 02:04 AM

Is it possible to use both Auto Generation (https://demos.telerik.com/blazor-ui/form/auto-generated) and Templates (https://demos.telerik.com/blazor-ui/form/templates)?

 

In other words, specify the template for a couple of items and let it autogenerate the rest?

 

This would be incredibly useful for handling situations like dropdown that need external data.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 09 Apr 2021, 08:37 AM

Hello Timothy,

Fully automatic generation requires that you do not use templates. Once you start defining your own items in the form, you must define all of them.

You could use reflection to get all the fields and define a simple FormItem for each, and then add a template only when needed, but you would still have to define the form yourself.

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Form
Asked by
Timothy J
Top achievements
Rank 2
Bronze
Iron
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or