I have tested this on your example for local data grid. It can be applicable also for remote grid, treelist, etc.
Hello Michael,`
Thank you for the feedback.
By design, the Grid considers all values with `null` as the JS primitive value `null`. The description of `null` is:
"The null value represents the intentional absence of any object value."
So the Grid shows an empty value when null is bound to a field.
However, this can be easily modified and adjusted according to the application's needs with the use of a template.
Regards,
Nikolay
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.
Sorry to hijack this old issue...
I have just stumbled across the same problem.
I do not understand why the described behaviour should be expected/intended. "Null" is just some string and should have nothing to do with null, meaning the absence of a value. E.g. in German, "Null" also means 0, this string could be used in a lot of different contexts where it has nothing to do with the JS null keyword.
This is why, in my opinion, treating null and "null" equally is misleading at best and dangerous at worst. Instead, I would expect cells with value null to be empty, while cells with value "null" to contain "null".
Hi Peter,
Generally, displaying nothing when the value is "null" is the desired functionality. Since the majority of the common users of the application might not completely comprehend when the null text is shown. It would be more talkative if the cell is left empty.
In other words, the described behavior is not a bug, rather, it is an intentional functionality. What I can recommend if you would like to show the null text is to utilize the template option of the grid's column:
{ field: "ProductName", template:"#=ProductName? ProductName: 'null'#"},
I hope you find this helpful.
Kind regards,
Tsvetomir
Progress Telerik