Is it possible to disable noDataTemplate

9 posts, 0 answers
  1. YK
    YK avatar
    1 posts
    Member since:
    Apr 2014

    Posted 15 Sep 2016 Link to this post

    Recent Kendo update added noDataTemplate shows when there is no search result.

    Is there way that make it not display in default?

  2. Stefan
    Admin
    Stefan avatar
    831 posts

    Posted 17 Sep 2016 Link to this post

    Hello Kim,

    The noDataTemplate property can be disabled by setting its value to false:

    http://dojo.telerik.com/EXEnu

    http://docs.telerik.com/kendo-ui/api/javascript/ui/autocomplete#configuration-noDataTemplate

    I hope this is helpful.

    Regards,
    Stefan
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
  3. Workspace
    Workspace avatar
    1 posts
    Member since:
    Apr 2017

    Posted 27 Apr Link to this post

    Is it possible to keep noDataTemplate capital and small letter mixed? Always it's showing in capital letter.
  4. Stefan
    Admin
    Stefan avatar
    831 posts

    Posted 01 May Link to this post

    Hello,

    Currently, the letters in the noDataTemplate property will be displayed only in capital letters.

    I can suggest submitting a feature request which will allow to modify this behaviour, and based on its popularity we may implement it in a future release:

    http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/category/170292-dropdowns



    Regards,
    Stefan
    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.
  5. Trevor
    Trevor avatar
    12 posts
    Member since:
    Jul 2012

    Posted 09 Jun Link to this post

    Is it possible to do this when using MVVM?
  6. Stefan
    Admin
    Stefan avatar
    831 posts

    Posted 13 Jun Link to this post

    Hello Trevor,

    The noDataTemplate can be disabled using the MVVM approach as well using the following syntax:

    data-no-data-template="false"

    Please have in mind that all of the jQuery properties can be used with the MVVM approach as well the syntax patent is the following:

    http://docs.telerik.com/kendo-ui/framework/mvvm/overview#set-data--options

    Regards,
    Stefan
    Progress Telerik
    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.
  7. Steve
    Steve avatar
    3 posts
    Member since:
    Sep 2016

    Posted 21 Jun Link to this post

    Is it possible to achieve this in MVC ?
    In js I can set noDataTemplate: false but in MVC I can only set .NoDataTemplate to a string. I tried an empty string but that just gives me the default NO DATA FOUND template
  8. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1181 posts

    Posted 22 Jun Link to this post

    Hello Steve,

    The AutoComplete's MVC wrapper does not allow false to be passed to the NoDataTemplate method, it only accepts string. The "NO DATA FOUND" message can be removed by passing a string containing space:
    .NoDataTemplate(" ")

    In case no data is found the dropdown can be prevented from popping up as shown below:
    $(document).ready(function () {
        var autocomplete = $("#countries").data("kendoAutoComplete");
        autocomplete.setOptions({ noDataTemplate: false });
    });


    Regards,
    Ivan Danchev
    Progress Telerik
    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.
  9. Steve
    Steve avatar
    3 posts
    Member since:
    Sep 2016

    Posted 22 Jun in reply to Ivan Danchev Link to this post

    Thanks Ivan. I'd figured that I could do it that way. This seems to be yet another example of where the MVC UI configuration options fall short of those available through JS
Back to Top