In Development
Last Updated: 30 Jan 2025 13:48 by ADMIN
Scheduled for 2025.1.2xxx (2025 Q1)
Martin
Created on: 06 Jan 2025 12:14
Category: UI for WinForms
Type: Bug Report
1
RadGridView: Null handling for GridViewRowCollection.Add(GridViewRowInfo item) unexpected

Repro-steps:

myRadGridView.Rows.Add((GridViewDataRowInfo)null);

Actual behavior

  1. NullReferenceException is thrown
  2. A new row is added.

Excepted behavior

  1. Or an ArgumentNullException is thrown, and no rows are added.
  2. Or a new row is added, and no exception is thrown.

Remark

The method AddRange is also impacted by this bug.

1 comment
ADMIN
Dinko | Tech Support Engineer
Posted on: 06 Jan 2025 14:39

Hi Martin,

Thank you for the listed details.

I have tested the behavior and indeed a row is added and afterward, an exception is thrown. We need to handle this scenario at the beginning of the Add() method and throw an exception that the null parameter can't be added as a row. I will approve the feedback item. As soon as our team starts working on the item to provide a fix, we will update the status so that you can be notified. 

I have updated your Telerik Points for bringing this to our attention.

Regards,
Dinko | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.