Radzen Blazor Components

DataGrid

When adding Blazor components conditionally they always render at the end. Use this technique to render conditionally specific DataGrid column(s) and keep the render order as declared in the markup/code.

In this demo the Photo column uses showPhoto within a RenderFragment to conditionally render in the correct position (between ID and First Name), with a switch to toggle its visibility while preserving column order.

Show employee photo:
ID
 
First Name
 
filter_alt
Last Name
 
filter_alt
Job Title
 
filter_alt
Title
 
filter_alt
Birth Date
 
filter_alt
Hire Date
 
filter_alt
Address
 
filter_alt
City
 
filter_alt
Region
 
filter_alt
Postal Code
 
filter_alt
Country
 
filter_alt
Home Phone
 
filter_alt
Extension
 
filter_alt
Notes
 
filter_alt
No records to display.
All the tools in one place

Save Hours on Every Project

With Radzen Blazor subscription you get the full toolkit, including:

support

Dedicated support backed by proven expertise

palette

Premium themes and theme editor

widgets

Ready-to-use UI blocks

dashboard_customize

Complete app templates

format_shapes

Visual design-time-experience

Radzen Blazor Studio

Radzen Blazor Components, © 2018-2025 Radzen.
Source Code licensed under MIT

Demos Configuration

Premium Themes

  • Material 3
  • Material 3 Dark
  • Fluent
  • Fluent Dark

Free Themes

  • Material
  • Material Dark
  • Standard
  • Standard Dark
  • Default
  • Dark
  • Humanistic
  • Humanistic Dark
  • Software
  • Software Dark
An error has occurred. This app may no longer respond until reloaded. Reload 🗙