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

No data message not displaying for server bound grid

4 Answers 1523 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Erik
Top achievements
Rank 1
Erik asked on 20 Nov 2017, 02:19 PM

I have server bound grid and a set message to be displayed when no data exists.  Below is my aspx view for the grid:

<% Html.Kendo().Grid(Model.BillingReport)
   .Name("billing_grid")
   .Columns(columns =>
   {
      columns.Bound(c => c.BillDate).Format("{0:M/d/yyyy}");
      columns.Bound(c => c.Account);
      columns.Bound(c => c.BillProgram);
      columns.Bound(c => c.Total).Format("{0:c}");
   })
   .NoRecords("No records found.")
   .Resizable(resizable => resizable.Columns(true))
   .DataSource(dataSource => dataSource.Server())
   .Render(); %>

 

On the rendered page, I see the column headers and nothing in the grid.  On the browser code, I see:

<tr class="k-no-data">
  <td colspan="5"></td>
</tr>

 

Why am I not seeing the message?

 

4 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 21 Nov 2017, 01:54 PM
Hello Erik,

It seems that there is a problem with the NoRecords message with server binding, although that the following works correctly:
@model IEnumerable<Kendo.Mvc.Examples.Models.Product>
 
@(Html.Kendo().Grid(new List<Product>())   
    .Name("Grid")
    .Columns(columns => {
        columns.Bound(p => p.ProductID).Groupable(false);
        columns.Bound(p => p.ProductName);
        columns.Bound(p => p.UnitPrice);
        columns.Bound(p => p.UnitsInStock);
    })
    .NoRecords("No records found.")
     
    .Pageable()
    .Sortable()
    .Scrollable()
    .DataSource(d=>d.Ajax().ServerOperation(false))
    .Filterable()
    .Groupable()
)

With your settings, in order to workaround the bug you could manually set the noRecords message in the Grid after the rendering.

Nevertheless, I will log this as a bug, so it could be investigated by our developers team.

Please excuse us for any inconvenience caused by this and if we can assist you with anything else, feel free to contact us again.


Regards,
Konstantin Dikov
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.
0
Konstantin Dikov
Telerik team
answered on 24 Nov 2017, 01:30 PM
Hello Erik,

I just want to let you know that you can follow the progress of the issue in our public repository:

Best Regards,
Konstantin Dikov
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.
0
Prasenjit
Top achievements
Rank 1
answered on 28 Feb 2019, 10:42 AM
Hi any update on the issue. I'm using server grid. I dont want to change it to several projects for showing this message .
0
Preslav
Telerik team
answered on 04 Mar 2019, 07:33 AM
Hello Prasenjit,

For the time being, the issue is not fixed. I raised the priority of the issue:

Regards,
Preslav
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Erik
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Prasenjit
Top achievements
Rank 1
Preslav
Telerik team
Share this question
or