Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 99250

Grid Grouping - Null vs Empty String

$
0
0

We noticed that when grouping on columns that sometimes have a null and sometimes have an empty string, it will create two different groupings.

I tried to update the ViewModel in MVC so the property always returns an empty string:

public class SampleViewModel
{    
    private string _name;        
   
    [StringLength(50)]
    public string Name    
    {        
        get { return _name ?? string.Empty; }        
        set { _name= value; }    
    }
}

That still produces two different groupings.

How can I get the grid to group these the same way?


Viewing all articles
Browse latest Browse all 99250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>