Datacontext: Binding: Values not updated?

7 posts, 0 answers
  1. Deepak Shakya
    Deepak Shakya avatar
    118 posts
    Member since:
    Aug 2007

    Posted 22 Aug 2011 Link to this post

    Hi,

    The title is a bit wierd but couldn't think of a decent one as I experienced more than one issue (I think)

    • I have a Listbox and RadPanelBar in view
    • RadPanelBar has RadPanelBarItems
    • I have RadMaskedTextBox within a Grid in one of the RadPanelBarItems
    • Grid's datacontext is set to SelectedItem
    • The textbox (child of Grid) is bound to one of the properties of the SelectedItem property in Viewmodel.
    • Listbox's SelectedItem is also bound to this property in viewmodel.

    Problem:
    • When the UI loads for the first time, the binding works fine
    • When I regenerate the list in the listbox and change the selecteditem, the textbox retains the original value
    • But when I set the datacontext of Grid to the SelectedItem, the textbox value changes and displays accordingly to the selecteditem in the listbox.
    • It works fine.

    Could you explain why this happens?

    Basically I want to set the Datacontext of the RadPanelBar so that I do not have to set the datacontext within each RadPanelBarItem.


  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 24 Aug 2011 Link to this post

    Hello Deepak Shakya,

    Could you please send us an isolated project showing this issue, its very hard to advice you certainly without viewing your code (especially XAML and ViewModels)? We changed this ticket's type to general feedback so that you are now able to attach files.
    Thank you for your cooperation in advance.

    Best wishes,
    Petar Mladenov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
  4. Deepak Shakya
    Deepak Shakya avatar
    118 posts
    Member since:
    Aug 2007

    Posted 24 Aug 2011 Link to this post

    I have submitted a general feedback with project solution. (457581)

  5. Raffaele
    Raffaele avatar
    14 posts
    Member since:
    Dec 2010

    Posted 09 Sep 2011 Link to this post

    I also have this issue. Can you help me?
  6. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 14 Sep 2011 Link to this post

    Hi Raffaele,

     We replied to your "Bug Report" ticket. We are looking forward to your sample. This way we could investigate this deeper and be better able to assist you. 

    All the best,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  7. Jacek Jura
    Jacek Jura avatar
    2 posts
    Member since:
    Aug 2008

    Posted 24 May 2012 Link to this post

    Hello,
    I have similar problem. Do you have some solution for this?
    Best regards,
    Jacek Jura
  8. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 29 May 2012 Link to this post

    Hi Jacek ,

     Could you please elaborate more on your exact scenario? It would be best if you can open a new support thread with an isolated sample attached. This way we would be better able to get into your scenario quickly and advice you.Thank you in advance.

    Regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner