Null values showing in ComboBox

2 posts, 0 answers
  1. timmy
    timmy avatar
    41 posts
    Member since:
    Dec 2006

    Posted 08 Feb Link to this post

    Hi,

    I'm using the following template to display values in a ComboBox:

    .Template("Name: <strong>#: data.FirstName # #: data.LastName #</strong> Organisation: #: data.Organisation #<br>Email: #: data.Email #, Telephone: #: data.Telephone # <br>-----------------------------")

    It's working fine except that null values from the database are actually displayed as 'null' in the display. For example, Name: null null Organisation: null.

    I've tried filtering the data on the server so it replaced null values with "" but that didn't seem to work.

    How can I replace the text 'null' with just a blank value?

    Thanks

    Tim

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    912 posts

    Posted 10 Feb Link to this post

    Hello Tim,

    Here's a sample dojo that shows how you can use an expression in the template, check the property's value and return an empty string instead of "null".

    Regards,
    Ivan Danchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top