DataForm Built in Code without a model/Class

Greetings,

Is it possible to build a Syncfusion Blazor DataForm entirely in code without a model/class?

ie
<SfDataForm id="df">
    <DataFormItems>
    </DataFormItems>
</SfDataForm id="df">

@code {

...

df.DataFormItems.Add(new DataFormTextItem ...
df.DataFormItems.Add(new DataFormTextItem ...
df.DataFormItems.Add(new DataFormDropDownItem ...
etc

}

Thanks




1 Reply

PK Priyanka Karthikeyan Syncfusion Team August 19, 2025 04:37 AM UTC

Hi Yemoku,


Thank you for your inquiry about building a Syncfusion Blazor DataForm without a model class.

 

The Syncfusion Blazor DataForm component is built on top of Blazor EditForm. It requires a backing model class. The component is designed to work with a model object that it uses to automatically generate form fields through reflection.

 

The DataForm component expects:

 

  • A Model property bound to an object instance
  • Form fields that correspond to properties in your model class
  • Data annotations on the model for validation and display purposes

 

For more information, please refer the below UG documentation

https://blazor.syncfusion.com/documentation/data-form/getting-started-with-web-app


If you have any additional questions or need assistance with implementing DataForm using a model class approach, please feel free to reach out.


Regards,

Priyanka K


Loader.
Up arrow icon