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

9 posts, 0 answers
  1. littleGreenDude
    littleGreenDude avatar
    17 posts
    Member since:
    Jan 2014

    Posted 01 Apr 2014 Link to this post

    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?
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 04 Apr 2014 Link to this post

    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!
     
  3. littleGreenDude
    littleGreenDude avatar
    17 posts
    Member since:
    Jan 2014

    Posted 04 Apr 2014 in reply to Alexander Popov Link to this post

    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); })
            )
  4. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 04 Apr 2014 Link to this post

    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!
     
  5. littleGreenDude
    littleGreenDude avatar
    17 posts
    Member since:
    Jan 2014

    Posted 04 Apr 2014 in reply to Alexander Popov Link to this post

    I'm getting a message that the GridEventBuilder does not contain a definition for RequestStart
  6. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 04 Apr 2014 Link to this post

    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!
     
  7. littleGreenDude
    littleGreenDude avatar
    17 posts
    Member since:
    Jan 2014

    Posted 04 Apr 2014 in reply to littleGreenDude Link to this post

    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?)
  8. littleGreenDude
    littleGreenDude avatar
    17 posts
    Member since:
    Jan 2014

    Posted 04 Apr 2014 in reply to Alexander Popov Link to this post

    2013.2.716.340
  9. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 04 Apr 2014 Link to this post

    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!
     
Back to Top