This is a migrated thread and some comments may be shown as answers.

Null values in column template

1 Answer 200 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nag
Top achievements
Rank 1
Nag asked on 08 Jun 2016, 03:41 PM
I have a kendo grid in which one column can have null values. But I don't see the grid populating when there are null values. My code is here:
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: gridData,
columns: [
{ field: "name", title: "Name"},
{ field: "result",
title: "Result",
template: "# if (result == null) { #" +
"<span data-content=' '></span> } #" +
"# } else { #" +
"<span data-content=\"#: result#\"> </span>"}]})
;});
I don't get the grid shown when the "result" is null. However, I can get the grid when the value is not null. Not sure on how to handle the null values in templates.

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 09 Jun 2016, 09:13 AM

Hello Nag,

I covered the question in the other thread on the same topic. Let me know if further assistance is needed.

Regards,
Dimiter Madjarov
Telerik
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Nag
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or