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

[Solved] Need to show appropriate message if no matching filterable records found

1 Answer 248 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prabhat
Top achievements
Rank 1
Prabhat asked on 07 Oct 2014, 06:26 PM

I have the following 2 simple requirements while dealing with Kendo Grid.

  • If there is no records present for the underlying datasource then display in the UI: No records found. Please add New record using Add New button.
  • If records present but on user click on any column Filter, and No matching records found then display in the UI: No matching records found for the given search criteria.

    I have accomplished the 1st task using Grid's OnDataBound() method.
    I am just verifying the datasource length and displaying appropriate message in UI.

    Please help me achieving the 2nd option. Because both of the case Grid's datasource length is 0 (zero).

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 09 Oct 2014, 07:17 AM
Hi Prabhat,

You can just check for if there are any filters applied to the dataSource, and if there are not records in the grid, then this filter have returned 0 matches. Here is an example that I created for you:

http://dojo.telerik.com/osob/2

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Prabhat
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or