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

Datacontext: Binding: Values not updated?

6 Answers 123 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Deepak Shakya
Top achievements
Rank 1
Deepak Shakya asked on 22 Aug 2011, 06:28 AM
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.


6 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 24 Aug 2011, 04:02 PM
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 >>

0
Deepak Shakya
Top achievements
Rank 1
answered on 25 Aug 2011, 04:12 AM
I have submitted a general feedback with project solution. (457581)

0
Raffaele
Top achievements
Rank 1
answered on 09 Sep 2011, 10:04 AM
I also have this issue. Can you help me?
0
Petar Mladenov
Telerik team
answered on 14 Sep 2011, 03:14 PM
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 >>

0
Jacek Jura
Top achievements
Rank 1
answered on 24 May 2012, 06:12 PM
Hello,
I have similar problem. Do you have some solution for this?
Best regards,
Jacek Jura
0
Petar Mladenov
Telerik team
answered on 29 May 2012, 07:07 AM
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 >>

Tags
PanelBar
Asked by
Deepak Shakya
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Deepak Shakya
Top achievements
Rank 1
Raffaele
Top achievements
Rank 1
Jacek Jura
Top achievements
Rank 1
Share this question
or