Null values in column template

2 posts, 0 answers
  1. Nag
    Nag avatar
    2 posts
    Member since:
    Jun 2016

    Posted 08 Jun 2016 Link to this post

    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() {
    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.
  2. Dimiter Madjarov
    Dimiter Madjarov avatar
    2310 posts

    Posted 09 Jun 2016 Link to this post

    Hello Nag,

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

    Dimiter Madjarov
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top