16 Answers, 1 is accepted
The Grid internally uses a templating engine, which at some stage performs string concatenations. When you concatenate null and some string, the null value is transformed into a "null" string.
You can avoid seeing the null values by modifying the data that is serialized to the client, or iterating through all cells and removing the null string manually.
All the best,
the Telerik team
Seems to be undesired behavior to me but, fair enough.
Create a row template using the function in the field place holders.
Still a 'null' string disaster NOW after Form Post and back (while ModelState.IsValid = false),
dataItem's column value becomes 'null' string (next Form Post - [Required] passed unexpectedly).
Is there have a global option (like kendo.culture) to turn null to '' default/automatically ?
Since R1 2018, the Grid is treating null values as empty strings and not showing it in the Grid.
Also, if the value null is typed inside a field, it will be converted from the string null to the value null.
It was introduced after fixing this case:
Please advise if the same result occurs after using the latest version.
If the issue still occurs, please send us an example reproducing it and we will gladly investigate further.
I am currently using the grid with batch editing and using Telerik.UI.for.AspNet.Core (2018.2.620). Within that grid I have a column called comments that is still showing "null" when it should show nothing (empty string) when rendering. Should this have been fixed with the latest version of the software? Screenshots attached.
If the 2018.2.620 version is used then the null values should not be displayed.
Could you please ensure that the scripts are updated as well and there are no cached files.
If the issue still occurs, please provide an example reproducing it and I will gladly investigate.
Additionally, if providing an example is not possible at the time, a workaround would be to use a ClientTemplate and return an empty string if the value is null:
I copied the js and styles folders from Program Files (x86)\Progress\Telerik UI for ASP.NET Core R2 2018 to the \wwwroot\lib\kendo-ui\ folder on my project, cleaned my project, recompiled and ran the project and still get the same error. I then opened it in the browser being used by Visual Studio and also Chrome to verify it wasn't a browser issue, but the null still shows up.
Below is the code for the grid - Please advise.
I copied over the files from the following location Program Files (x86)\Progress\Telerik UI for ASP.NET Core R2 2018 to this location in my project \wwwroot\lib\kendo-ui, cleaned my project, recompiled, and debugged, but I still show the same error. I even opened up the site in Chrome in case IE was caching something and the null still showed up. Below is the code for the grid. Let me know if you need anything else.
I figured it out using the ClientTemplate, although it would be nice if it just worked without using the template. What do you think I could be doing wrong that it's not working with the latest version? The code I used below is what I used in case anyone else runs into this issue.
I can suggest checking the following article about updating with contains the required steps and some troubleshooting approaches:
The article is for the MVC widgets but it is applicable for the Core widgets as well.
If this still does not resolves the issue, I hope that the workaround will be acceptable for now.