Grid grouping problem if there is undefined value

0 Answers 30 Views
Grid
Jie
Top achievements
Rank 3
Iron
Iron
Iron
Jie asked on 15 Jul 2024, 01:57 PM

Hi,

When grouping by a column, if some rows have undefined value for that column field. The grid will display an empty row and the row with undefined field is missing in the grid.

https://codesandbox.io/p/sandbox/purple-dream-72dtr2?file=%2Fapp%2Fshared-gd-products.json%3A18%2C4

In my example, I removed "CategoryName" from the first item in shared-gd-products.json. So CategoryName for first item is undefined. The grid shows an empty row as the first row in the grid. See the attached screenshot.

 

Thanks,

Jie

Konstantin Dikov
Telerik team
commented on 15 Jul 2024, 03:47 PM

Hi Jie,

Currently the groupBy/process helper method will not handle undefined values. In order to include those items in the grouping you need to manually replace the undefined value with "null":

We also have an open issue regarding this. I increased the priority of the item, but at this point, we could not elaborate on when a change will be added within the helper methods:

 

Jie
Top achievements
Rank 3
Iron
Iron
Iron
commented on 15 Jul 2024, 03:57 PM

Hi Konstantin, thanks for the response. Converting all undefined to null is a lot of works because we have a lot of grids, and it is an extra work for maintenance. But I guess this is the only way for now.

 

Thanks,

Jie

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Jie
Top achievements
Rank 3
Iron
Iron
Iron
Share this question
or