Vladimir Enchev, December 19, 2018

Visually design Blazor application

In this blog post I'm going to show you how to use the powerful Radzen designer to visually design your Blazor application.

1. Create new Blazor project, add our Sample data source and add new empty page.

image image image image

2. Drop DataGrid component from the toolbox and bind it to Sample Products.

image image image image

3. Edit Product Picture DataGrid column using the template designer and add new Image component bound to ${data.ProductPicture}. Set Width property to 100px.

image image image image

4. Add new column to the DataGrid, drop a Button component with delete icon in column template and invoke deleteProduct data source method. Execute the grid Reload() method after delete.

image image image image

5. Add new Add Product page, drop a Button component on Products page, set Text to Add Product and navigate to Add Product on Click.

image image image

Let's design now Add Product page.

6. Open Add Product page, add new Page Load event and set new product property of type Product to new Product().

image

7. Drop TemplateForm to Add Product page and bind it to product Page property.

image

8. Drop Row with two Columns in the TemplateForm. Add Label in the first column and TextBox in the second with Name property set to ProductName.

image

9. Duplicate the first row, change the Label Text, remove the TextBox and add Numeric with Name set to ProductPrice.

image image

10. Duplicate the second row, change the Label Text, remove the Numeric and add FileInput with Name set to ProductPicture.

image

11. Invoke createProduct with product property as parameter on TemplateForm Submit event.

image

12. Run the application and you will see the Radzen DataGrid component data-bound to the Products table of the Sample database. Click Add Product button to add new product and click delete button to delete existing products.

image image image

Congratulations! You've just viusally designed fully functionall Blazor application without writing any code.

image

Enjoy!

© 2016-2025 Radzen Ltd. All Rights Reserved.
Designed and developed with ❤️ in Radzen Blazor Studio.

Select theme:

Material 3