GetItemByPath returns null when RadBusyIndicator.IsBusy is true

5 posts, 0 answers
  1. Todd
    Todd avatar
    7 posts
    Member since:
    Jul 2010

    Posted 24 May 2011 Link to this post

    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.

    // 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?
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 27 May 2011 Link to this post

    Hello Todd,

    Unfortunately, we are unable to reproduce this issue at our side. Could you please try to isolate your problem in a sampler scenario or you can send us a support ticket so that you will be able to attach files? This way we could investigate this better and provide you with an advice or better suited solution. Thank you in advance for your situation.

    Kind regards,
    Petar Mladenov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Todd
    Todd avatar
    7 posts
    Member since:
    Jul 2010

    Posted 27 May 2011 Link to this post

    I have opened a support ticket/bug report and sent a sample program that illustrates the problem.

    Some clarification:

    If the tree has been expanded at some point, either programatically or manually, GetItemByPath returns a valid RadTreeViewItem.  However, calls to expand or select that node don't seem to work -- if the tree is collapsed and the busy indicator is being shown, the tree stays collapsed.

    If the tree has never been expanded, either manually or programatically, GetItemByPath returns a null when the BusyIndicator is shown, and a valid value when the BusyIndicator is not shown.
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 01 Jun 2011 Link to this post

    Hello Todd,

    Unfortunately, we are unable to find your support ticket. Could you please provide ticked ID or link or the email address of the sender of the ticket ? Thank you in advance.

    All the best,
    Petar Mladenov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  6. Todd
    Todd avatar
    7 posts
    Member since:
    Jul 2010

    Posted 01 Jun 2011 Link to this post

    For some reason, my support ticket disappeared.  I resubmitted it, along with the sample code.  The ticket number is 430150.
Back to Top
DevCraft banner