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

Async ItemDataBound, etc

3 Answers 407 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kyle
Top achievements
Rank 2
Kyle asked on 24 Jul 2015, 03:57 PM

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
}
}

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 29 Jul 2015, 08:03 AM
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
0
Kulveer
Top achievements
Rank 1
answered on 14 Dec 2016, 10:50 AM
Is async available in the latest version to needdatasource and Itembound events? 
0
Konstantin Dikov
Telerik team
answered on 19 Dec 2016, 07:48 AM
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.
Tags
Grid
Asked by
Kyle
Top achievements
Rank 2
Answers by
Konstantin Dikov
Telerik team
Kulveer
Top achievements
Rank 1
Share this question
or