Async ItemDataBound, etc

4 posts, 0 answers
  1. Kyle
    Kyle avatar
    1 posts
    Member since:
    Dec 2012

    Posted 24 Jul 2015 Link to this post

    Good afternoon everyone,

     I'm working on a conversion to an async/client-side UI.  I know that RadGrid's are rather touchy about master/detail/hierarchical grid types being bound client side, and in addition I need Export functionality on some grids.  This is leading to some of the grids being bound the "old" way, via ItemDataBound, NeedDataSource, etc.

     What I'm wondering is if the situation is supported in making an ItemDataBound function asynchronous.

    For example, I have a grid that displays a set of schedules, and a detail grid that displays a set of backups set to fire on said schedule.  There is some parsing that needs to happen in the code-behind ItemDataBound method (setting Image URLs, Tooltips, parsing Recurrence Rules, etc).  Is it possible to make those methods asynchronous?

     Thanks in advance!

    Example:

    protected async Task rgrdSchedules_ItemDataBound(object sender, GridItemEventArgs e)
    {
    if (e.Item is GridDataItem)
    {
    var myItem = (GridDataItem)e.Item;
    var taskScheduleGet = await IceApi.ExecuteGet<Schedule>("url/to/resource/" + myItem.GetDataKeyValue("ScheduleId").ToString());
     
    // Do Independent Work (Image URLs, ToolTips, etc) //
     
    Schedule mySchedule = await taskScheduleGet;
     
    // Do bindings to mySchedule
    }
    }

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 29 Jul 2015 Link to this post

    Hello Kyle,

    The requirement that you have is not supported and it is not possible to change the events of the grid to make them asynchronous. However, you can try to register your async tasks and pass the GridDataItem as parameter, but this is not tested scenario, so it would be up to the developer to experiment with it.


    Regards,
    Konstantin Dikov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Kulveer
    Kulveer avatar
    5 posts
    Member since:
    Apr 2016

    Posted 14 Dec 2016 in reply to Konstantin Dikov Link to this post

    Is async available in the latest version to needdatasource and Itembound events? 
  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 19 Dec 2016 Link to this post

    Hi Kulveer,

    This is something that is still not available in the suite and currently there are no plans for such implementation. You could however log a feature request in our public item and allow other developers to vote for it in order to increase its priority:

    Best Regards,
    Konstantin Dikov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top