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

How to use '.t-no-data' with Kendo?

8 Answers 55 Views
Let's talk about telerik (the good and the bad)
This is a migrated thread and some comments may be shown as answers.
littleGreenDude
Top achievements
Rank 1
littleGreenDude asked on 01 Apr 2014, 04:32 PM
The following function used to work with the Telerik grid, but now that we have upgraded to Kendo, it no longer works.
function Grid_onLoad(e) {
 $(
'.t-no-data td').text('Loading Records...');
}

Any recommendations?

8 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 04 Apr 2014, 08:51 AM
Hello Stephen,

The Grid's tbody could be used instead, as shown in this example.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
littleGreenDude
Top achievements
Rank 1
answered on 04 Apr 2014, 12:12 PM
Thank you for the reply, but what should it be when the datasource is loaded like this:

@(Html.Kendo().Grid<OrderInventory>()
    .Name("Orders")
    .Events(events => events.DataBound("onDataBound"))
    .DataSource(dataSource => dataSource
        .Ajax()
        .ServerOperation(false)
        .Read(read => read.Action("OrderListAjax", controller, new { categoryId = Model.CategoryId, categoryDesc = Model.CategoryDesc, industryType = Model.IndustryType, viewType = Model.ViewType }))
        .PageSize(Constants.PageSize)
        .Filter(filters => { filters.Add(c => c.CurrentBalance).IsGreaterThan(0); })
        )
0
Alexander Popov
Telerik team
answered on 04 Apr 2014, 12:22 PM
Here is an example how to subscribe for the DataSource events
@(Html.Kendo().Grid<OrderInventory>()
    .Name("Orders")
    .Events(events => events.DataBound("onDataBound"))
    .DataSource(dataSource => dataSource
        .Ajax()
        .Events(events => events.RequestStart("onRequestStart"))
        .ServerOperation(false)
        .Read(read => read.Action("OrderListAjax", controller, new { categoryId = Model.CategoryId, categoryDesc = Model.CategoryDesc, industryType = Model.IndustryType, viewType = Model.ViewType }))
        .PageSize(Constants.PageSize)
        .Filter(filters => { filters.Add(c => c.CurrentBalance).IsGreaterThan(0); })
        )
<script>
    function onRequestStart(){
        $("#Orders tbody").text("Loading data...");
    }
</script>


Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
littleGreenDude
Top achievements
Rank 1
answered on 04 Apr 2014, 01:00 PM
I'm getting a message that the GridEventBuilder does not contain a definition for RequestStart
0
Alexander Popov
Telerik team
answered on 04 Apr 2014, 01:06 PM
Which version of Kendo UI are you using?

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
littleGreenDude
Top achievements
Rank 1
answered on 04 Apr 2014, 01:09 PM
more detail....

error CS1061: 'Kendo.Mvc.UI.Fluent.GridEventBuilder' does not contain a definition for 'RequestStart' and no extension method 'RequestStart' accepting a first argument of type 'Kendo.Mvc.UI.Fluent.GridEventBuilder' could be found (are you missing a using directive or an assembly reference?)
0
littleGreenDude
Top achievements
Rank 1
answered on 04 Apr 2014, 01:21 PM
2013.2.716.340
0
Alexander Popov
Telerik team
answered on 04 Apr 2014, 02:20 PM
Hello again Stephen,

I tried to reproduce this behavior but everything worked as expected on our side. Although the requestStart event is supported in Kendo UI 2013.2.716, I would recommend upgrading to the latest official release (2014.1.318).
Please, do let us know in case the issue persists after the upgrade.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Let's talk about telerik (the good and the bad)
Asked by
littleGreenDude
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
littleGreenDude
Top achievements
Rank 1
Share this question
or