Update BreadCrumb items after being bound

6 posts, 0 answers
  1. Adam
    Adam avatar
    70 posts
    Member since:
    Jun 2008

    Posted 19 Jun 2014 Link to this post

    Hi there,

    Will someone please guide me on how to update BreadCrumb items after they've been bound once. I've tried it multiple ways and no matter what variation I try, I always get some kind of read-only collection exception. It seems like a simple thing to update the collection of the RootBreadCrumb but I have yet to be successful.

    Thanks!
    Adam.g
  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 23 Jun 2014 Link to this post

    Hi Adam,

    I am not sure I completely understand how you bind your collection and how you update it. Can please you elaborate more on your scenario by sending me a sample project demonstrating your implementation. This will help me in better understanding your case and assist you further?

    Regards,
    Martin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Adam
    Adam avatar
    70 posts
    Member since:
    Jun 2008

    Posted 26 Jun 2014 in reply to Martin Link to this post

    Hi Martin,

    I think that the scenario is not extraordinary. We have a breadcrumb bound with an ItemsSource to an ObservableCollection. Then, anytime that we modify the collection that is bound to the breadcrumb, upon raising property changed, we get the aforementioned error.
  5. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 26 Jun 2014 Link to this post

    Hello Adam,
    I've attached a sample Breadcrumb MVVM application in which I have two buttons:
    - the first one adds children directly to the Items collection which is bound to the ItemsSource of the Breadcrum
    - the second one adds a new item to the children collection of the first item ("Item 0")
    and everything seems to be working correctly.
    I'd like to ask you to examine our project and tell us what you're doing differently so that we could better understand your scenario and reproduce the issue on our side.

    Regards,
    Zarko
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  6. Adam
    Adam avatar
    70 posts
    Member since:
    Jun 2008

    Posted 04 Aug 2014 in reply to Zarko Link to this post

    Hi guys,

    I've been unable to recreate this in your example or my own isolated example. I have, however, narrowed it down to a general area. In our project we are extending the RadBreadcrumb into its own custom control. However, we only add a CurrentItemChangedCommand to the control and I have eliminated something in our code from causing the exception. The interesting is that if I use the normal RadBreadCrumb, we do not see an error. But when using our custom control, we do. I've also pretty much eliminated there being something broken by themes or styles being set as it doesn't appear that we do this at all. Is there anything we should be aware of when inheriting from this control? Does there appear to be any issues that you would see in your code base were the control to be extended?

    Thanks!
    Adam.g


  7. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 06 Aug 2014 Link to this post

    Hello Adam,
    Thank you for the further information but unfortunately we're still not able to reproduce this issue. I'd like to ask you for some code snippets:
    - what additional code do you have in your custom breadcrumb
    - what you do on the command
    - how do you change the breadcrumb collection and etc.
    or even better a sample project so that we could investigate the issue on our side.
    We're looking forward to hearing from you.
    p.s. I tested the inherited scenario in the sample project from my previous reply and everything was working fine.

    Regards,
    Zarko
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
DevCraft banner