Bug Report T853567
Visible to All Users

DataGrid for Blazor - NullReferenceException occurs if the grid is empty and DxDataGridComboBoxColumn is used with a hidden filter row

created 5 years ago

To reproduce the issue, click the "New" button. In the Web Console (F12), you will see the error message.

Code:

Razor
<DxDataGrid Data="@Forecasts" PageSize="5" ShowPager="false" ShowFilterRow="false" RowUpdating=@((updatingDataItem, newValues) => OnRowUpdating(updatingDataItem, newValues)) RowInserting=@((newValues) => OnRowInserting(newValues))> <DxDataGridCommandColumn Width="150px" /> <DxDataGridColumn Field="@nameof(WeatherForecast.Date)"></DxDataGridColumn> <DxDataGridColumn Field="@nameof(WeatherForecast.TemperatureC)"></DxDataGridColumn> <DxDataGridColumn Field="@nameof(WeatherForecast.TemperatureF)"></DxDataGridColumn> <DxDataGridComboBoxColumn Data="@WeatherForecastService.Summaries" TextFieldName="@nameof(WeatherForecast.Summary)" ValueFieldName="@nameof(WeatherForecast.Summary)" Field="@nameof(WeatherForecast.Summary)"></DxDataGridComboBoxColumn> </DxDataGrid> @code { List<WeatherForecast> Forecasts; protected override async Task OnInitializedAsync() { Forecasts = new List<WeatherForecast>(); } async void OnRowUpdating(WeatherForecast item, Dictionary<string, object> newValue) { } async void OnRowInserting(Dictionary<string, object> newValue) { } }

Answers approved by DevExpress Support

created 5 years ago

We have fixed the issue described in this ticket and will include the fix in our next update. The update will be available via the DevExpress NuGet server. Refer to this page to obtain your personal NuGet feed URL.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.