Skip to content

Latest commit

 

History

History
74 lines (55 loc) · 3.86 KB

grid-azure-empty-cells.md

File metadata and controls

74 lines (55 loc) · 3.86 KB
title description type page_title slug tags res_type ticketid
Fixing Bound(null) in Telerik UI for ASP.NET Core Grid with .NET 9 on Azure App Services
This article provides a solution for issues related to empty cells when using Bound(null) in Grid columns upon deploying an ASP.NET Core MVC application to Azure App Services with .NET 9.
troubleshooting
Resolving Grid Column Display Issues in .NET 9 Azure App Services Deployments
grid-azure-empty-cells
kendo-ui, grid, asp.net-core, asp.net-mvc, azure-app-services, .net9, deployment, bound-null
kb
1679003

Environment

Product Progress® Telerik UI® Grid for ASP.NET Core

Description

When deploying an ASP.NET Core MVC application using Telerik UI for ASP.NET Core Grid to Azure App Services after upgrading to .NET 9, a column bound with Bound(null) fails to render, showing an empty column instead. This issue does not occur when running the application locally or when using .NET 8.

The Grid has a column that binds to null, as per the example below:

 columns.Bound(null).ClientTemplate("Test").Title("Test");

The column cells are empty when the application is deployed on an Azure environment that uses .NET 9: Empty Cells

Cause

The issue itself probably stems from the breaking changes introduced with .NET 9. More specifically, where fields are nullable by default.

Namely, the following pull request in the aspnetcore repository: dotnet/aspnetcore#59533

The Grid works locally but not in an Azure environment because the version of .NET 9 Azure is older and still has the bug. Your local machine is probably using the newer .NET SDK version 9.0.200.

Solution

The Bound(null) syntax is not expected by default. Apparently, .NET 8 somehow let it slide until now. For more information on how to bind a Grid column to null, check out the following discussions:

In some scenarios, you would want to have a non-defined field like Bound(null). Use any of the following approaches to resolve the issue.

  1. Utilize the Template() option to display the desired value:
columns.Template("Test2").Title("Test");

As a result, the Test2 column shows the specified value: Proper Cells

  1. Ensure that your local development environment and Azure deployment environment use the same version of the .NET 9 SDK/ASP.NET runtime. If they differ, consider deploying your application as a self-contained deployment (SCD). This approach packages the .NET runtime with your application, ensuring the same runtime version is used both locally and in Azure. Both Columns

By following any of these approaches, the Grid columns should be displayed as expected when deploying the ASP.NET Core MVC application to Azure App Services with .NET 9. Both Columns

See Also