| 
 | 1 | +---  | 
 | 2 | +title: Fixing Bound(null) in Telerik UI for ASP.NET Core Grid with .NET 9 on Azure App Services  | 
 | 3 | +description: 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.  | 
 | 4 | +type: troubleshooting  | 
 | 5 | +page_title: Resolving Grid Column Display Issues in .NET 9 Azure App Services Deployments  | 
 | 6 | +slug: grid-azure-empty-cells  | 
 | 7 | +tags: kendo-ui, grid, asp.net-core, asp.net-mvc, azure-app-services, .net9, deployment, bound-null  | 
 | 8 | +res_type: kb  | 
 | 9 | +ticketid: 1679003  | 
 | 10 | +---  | 
 | 11 | + | 
 | 12 | +## Environment  | 
 | 13 | +<table>  | 
 | 14 | +<tbody>  | 
 | 15 | +<tr>  | 
 | 16 | +<td>Product</td>  | 
 | 17 | +<td>Progress® Telerik UI® Grid for ASP.NET Core</td>  | 
 | 18 | +</tr>  | 
 | 19 | +</tbody>  | 
 | 20 | +</table>  | 
 | 21 | + | 
 | 22 | +## Description  | 
 | 23 | +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.  | 
 | 24 | + | 
 | 25 | +The Grid has a column that binds to `null`, as per the example below:  | 
 | 26 | +```Razor  | 
 | 27 | + columns.Bound(null).ClientTemplate("Test").Title("Test");  | 
 | 28 | + ```  | 
 | 29 | + | 
 | 30 | +The column cells are empty when the application is deployed on an Azure environment that uses .NET 9:  | 
 | 31 | +  | 
 | 32 | + | 
 | 33 | +## Cause  | 
 | 34 | + | 
 | 35 | +The issue itself probably stems from the <a href="https://github.com/dotnet/aspnetcore/issues?q=milestone%3A9.0.2%20is%3Aclosed%20label%3Aservicing-approved%20" target="_blank">breaking changes introduced with .NET 9</a>. More specifically, where fields are nullable by default.  | 
 | 36 | + | 
 | 37 | +Namely, the following pull request in the **aspnetcore** repository:  | 
 | 38 | +https://github.com/dotnet/aspnetcore/pull/59533  | 
 | 39 | + | 
 | 40 | +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.  | 
 | 41 | + | 
 | 42 | +## Solution  | 
 | 43 | + | 
 | 44 | +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:  | 
 | 45 | +- https://www.telerik.com/forums/how-do-i-bound-null-object-value  | 
 | 46 | +- https://stackoverflow.com/questions/74200047/support-null-columns-on-grid  | 
 | 47 | + | 
 | 48 | + 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.  | 
 | 49 | + | 
 | 50 | +1. Utilize the `Template()` option to display the desired value:  | 
 | 51 | + | 
 | 52 | +```Razor  | 
 | 53 | +columns.Template("Test2").Title("Test");  | 
 | 54 | +```  | 
 | 55 | + | 
 | 56 | +As a result, the **Test2** column shows the specified value:  | 
 | 57 | +  | 
 | 58 | + | 
 | 59 | +2. 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.  | 
 | 60 | +  | 
 | 61 | + | 
 | 62 | +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.  | 
 | 63 | +  | 
 | 64 | + | 
 | 65 | + | 
 | 66 | +## See Also  | 
 | 67 | + | 
 | 68 | +* [Client-Side API Reference of the Grid for {{ site.framework }}](https://docs.telerik.com/kendo-ui/api/javascript/ui/grid)  | 
 | 69 | +* [Server-Side API Reference of the Grid for {{ site.framework }}](https://docs.telerik.com/{{ site.platform }}/api/grid)  | 
 | 70 | +{% if site.core %}  | 
 | 71 | +* [Server-Side TagHelper API Reference of the Grid for {{ site.framework }}](https://docs.telerik.com/{{ site.platform }}/api/taghelpers/grid)  | 
 | 72 | +{% endif %}  | 
 | 73 | +* [Telerik UI for {{ site.framework }} Breaking Changes]({%slug breakingchanges_2023%})  | 
 | 74 | +* [Telerik UI for {{ site.framework }} Knowledge Base](https://docs.telerik.com/{{ site.platform }}/knowledge-base)  | 
0 commit comments