This question is locked. New answers and comments are not allowed.
Hi,
Following the email sample that you've produced to show the Expander control, it uses an ExpderControl inside a RadDataBoundListBox which looks great out of the box.
When the bound list changes, the header in the ExpanderControl does not refresh/rebind. I've put together a sample application here; which shows both changing the List entirely and also just clearing the list with new items. On the second page of the pivot control, the same items are bound to the build-in longlistselector which updates without problems.
The other behaviour I've noticed is that the Expander Control doesn't properly work in an ItemsControl or LongListSelector, as in, none of the items seem to bind properly, though this could be a separate issue.
My use case is: A user has done a search to view an initial list of items, and can then re-search with different parameters to return a completely different set of items.
Thanks,
Brendan
Following the email sample that you've produced to show the Expander control, it uses an ExpderControl inside a RadDataBoundListBox which looks great out of the box.
When the bound list changes, the header in the ExpanderControl does not refresh/rebind. I've put together a sample application here; which shows both changing the List entirely and also just clearing the list with new items. On the second page of the pivot control, the same items are bound to the build-in longlistselector which updates without problems.
The other behaviour I've noticed is that the Expander Control doesn't properly work in an ItemsControl or LongListSelector, as in, none of the items seem to bind properly, though this could be a separate issue.
My use case is: A user has done a search to view an initial list of items, and can then re-search with different parameters to return a completely different set of items.
Thanks,
Brendan
5 Answers, 1 is accepted
0
Hello Brendad,
Thanks for writing.
When you put a RadExpanderControl into a Data Template you need to bind its Content and ExpandableContent properties to the data context as follows:
This should resolve the issues that you experience.
I hope this helps.
Kind regards,
Deyan
the Telerik team
Thanks for writing.
When you put a RadExpanderControl into a Data Template you need to bind its Content and ExpandableContent properties to the data context as follows:
<DataTemplate> <telerikPrimitives:RadExpanderControl Content="{Binding}" ExpandableContent="{Binding}"This should resolve the issues that you experience.
I hope this helps.
Kind regards,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Brendan
Top achievements
Rank 1
answered on 16 Apr 2013, 12:39 PM
Thanks for the reply.
The content binds fine the first time, it just doesn't update if the ItemsSource
items change until the ExpanderControl is expanded and collapsed.
The viewmodel correctly implements INotifyPropertyChanged and the regular LongListSelector updates fine using the same ItemsSource. Unless there's something else, it seems like it could be a bug in the control.
Brendan
The content binds fine the first time, it just doesn't update if the ItemsSource
items change until the ExpanderControl is expanded and collapsed.
The viewmodel correctly implements INotifyPropertyChanged and the regular LongListSelector updates fine using the same ItemsSource. Unless there's something else, it seems like it could be a bug in the control.
Brendan
0
Hello Brendan,
Thanks for writing back.
I am not quite sure that I correctly understand the case.
By implementing the bindings as shown in my previous post I am not able to reproduce any undesired behavior. This is the way the ExpanderControl is used in DataBoundListBox.
Can you please try implementing the bindings first and if the issue persists, send me an updated project so that I can further investigate the case?
Regards,
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Brendan
Top achievements
Rank 1
answered on 16 Apr 2013, 09:31 PM
Essentially what I'm seeing is in this screen shot.
I've updated the project here with your suggestion.
And here is a list of steps:
Ideas?
I've updated the project here with your suggestion.
And here is a list of steps:
- When the app initially loads [link]
- Swipe across to the equivalent LongListSelector on pivot page 2 [link]
- From the Menu select "change items" which will remove all items from the observable collection and add new ones [link]
- The long list selector has updated [link]
- The Expander control is showing the previous values... [link]
- Expanding and collapsing an item shows the new value link]
Ideas?
0
Hello Brendan,
Thanks for getting back to me.
We have introduced some fixes in RadExpanderControl in one of our Internal Builds recently.
I am not able to reproduce this behavior with these bits so I suggest you check the LIB we have on our website and let me know if it works for you.
All the best,
Deyan
the Telerik team
Thanks for getting back to me.
We have introduced some fixes in RadExpanderControl in one of our Internal Builds recently.
I am not able to reproduce this behavior with these bits so I suggest you check the LIB we have on our website and let me know if it works for you.
All the best,
Deyan
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.