Hello,
I have a grid which has a column of dataype "string". Some of the values are NULL and are currently displayed as "null" (see screenshot). How would I influence how nullvalues are displayed ? In this case I want it displayed by string.empty instead.
For the winforms grid there is a property on a column of type Infragistics.Win.UltraWinGrid.Nullable to influence how it is displayed.
Kind regards,
Michael
hey Michael,
in your data source, do you have "null" as a string (the way i am writing it with the quotes), or as an actual null value? nulls for column of type string should be rendered as empty strings by default, it's strange that you're getting a null visible in the grid cells
Thanks
Angel
Hey Angel,
I can confirm the property is NULL, and not the string value "null", see screenshot here below.
The property seems quite normal:public string Template { get; set; }
The column definition:model.Columns.Add(new GridColumn("Template", "Template", "string", "120px"));
Hi Mike,
I have tried this with latest version and using my own MVC sample and can't reproduce it. I have just added in my sample such a column - public string Template and it is working properly. So my advice is just to test with latest version(as Angel proposed). If you encounter again this issue please send us a sample and we can check it on our side.
Thanks,
Miro Hristov
Hi all,
I had the same problem. There were null values in one column and I'm also using a row template.
Setting the column's data type did all the magic:
gridModel.Columns.Add(new GridColumn { Key = "column name", DataType = "string" });
Maybe this helps anyone.
Markus
I am also having same problem with iggrid which has a column of dataype "number" and Some of the values are NULL and are currently displayed as "null". One of the column in the grid has a template column with a href link. If I remove the template, then null fields are displayed as string.empty, else they are displayed as "null".
Regards,Renganathan.R