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

How to create noRecordsTemplate in MVVM?

1 Answer 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Federico
Top achievements
Rank 1
Federico asked on 10 Oct 2017, 11:28 AM
noRecords: {
    template: "nessun elemento"
  }

 

I'd like to do this but with mvvm.

This is my kendo grid:

 

               <div id="a"
                   data-role="grid"
                   data-no-records="templateNoRecords"
                   data-columns="[
                                { 'title': 'ID', 'field': 'id' ,hidden: true },
                           { 'title': 'Nome', 'field': 'nome' },
                    ]"
                   data-bind="source: products.source}">
               <script id="templateNoRecords" name="templateNoRecords" type="text/x-kendo-template">
                   Nessun dato trovato
               </script>
            </div>

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Preslav
Telerik team
answered on 11 Oct 2017, 12:49 PM
Hello Federico,

The correct syntax should be:

data-no-records="{ template: 'Nessun dato trovato'}"

For a runnable example, check my testing Dojo: http://dojo.telerik.com/AfuWi

I hope this helps.


Regards,
Preslav
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Federico
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Share this question
or