This question is locked. New answers and comments are not allowed.
In our UI, we set the RadBusyIndicator.IsBusy to true while we make a
web service call to get data to populate a RadTreeView control. When we
make updates to the data, we do the same thing: Set the
RadBusyIndicator to Busy, make the call to the web service, update the
treeview, and then set the RadBusyIndicator.IsBusy to false.
When we update the treeview, we want to select a particular node, and expand the tree to that node. We do this by calling RadTreeView.GetItemByPath. This works great when the RadBusyIndicator is not busy, but when it is busy, GetItemByPath always returns null. We do need to block the user during this operation, because we want to prevent concurrent web service calls.
We have tried updating the treeview after the RadBusyIndicator.IsBusy is set to false. However, because there is a bit of a lag before the RadBusyIndicator actually is dismissed, the call still fails.
Is this a bug that can be fixed in the next release? Or is there a good workaround?
When we update the treeview, we want to select a particular node, and expand the tree to that node. We do this by calling RadTreeView.GetItemByPath. This works great when the RadBusyIndicator is not busy, but when it is busy, GetItemByPath always returns null. We do need to block the user during this operation, because we want to prevent concurrent web service calls.
We have tried updating the treeview after the RadBusyIndicator.IsBusy is set to false. However, because there is a bit of a lag before the RadBusyIndicator actually is dismissed, the call still fails.
// This block fails -- item is always null while BusyIndicator is shown
private void btnShowBusyIndicator_Click(object sender, RoutedEventArgs e)
{
busyIndicator.IsBusy = true;
RadTreeViewItem item = tvTest.GetItemByPath("RootItem|SubItem 1|SubItem 3", "|");
if (item != null)
{
item.IsExpanded = true;
item.IsSelected = true;
}
busyIndicator.IsBusy = false;
}
// This block is successful -- a valid item is returned from GetItemByPath
private void btnNoBusyIndicator_Click(object sender, RoutedEventArgs e)
{
RadTreeViewItem item = tvTest.GetItemByPath("RootItem|SubItem 1|SubItem 3", "|");
if (item != null)
{
item.IsExpanded = true;
item.IsSelected = true;
}
}
Is this a bug that can be fixed in the next release? Or is there a good workaround?