Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Binding nodes as on Tutorial 3 (Read 1558 times)
baba
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Jan 20th, 2010
Binding nodes as on Tutorial 3
Jan 21st, 2010 at 1:22pm
Print Post  
Hi,
as on my own yesterday post, I'm still facing the Tutorial 3 scenario.
I've made the diagram create my derived "OrgChartNode" instances, both programmatically and through UI interaction.

I've extended also the generic.xaml file by adding controls which bind to dependency properties (e.g. "FullName" in OrgChartNode).
One of the dependency proprties I've added is a collection declared as IList<IMyListItem>.
The genric.xaml structure has been provided with a ListBox control that binds to the above collection property.

To test the code I've populated programmatically the above list during object (OrgChartNode) creation and then the OrgCharNode control properly displays both the items when rendered.

Then I've tried to modify the list after object construction by adding a new list item through a button.

The problem is that, this time, the OrgChartNode isn't refreshed as I would expect by the mean of its binding and I still see the old two items in the list box.

Am I taking something wrong? What should I do to "refresh" the OrgChartNode listbox after modification?

Cheers,
baba
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Binding nodes as on Tutorial 3
Reply #1 - Jan 21st, 2010 at 2:43pm
Print Post  
Does your actual list object implement the INotifyCollectionChanged interface? Even if it doesn't, you might still be able to refresh the listbox by assigning the whole list back to the property.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint