Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to react to a cell value changing from datasource

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
jmaeding



Joined: 11 Apr 2008
Posts: 67

PostPosted: Thu Mar 03, 2011 1:59 am    Post subject: How to react to a cell value changing from datasource Reply with quote

My datasource works great with the VT, I can change values and the tree updates fine.
What I want to do is tell the tree to change a property of a cell's cellwidget when its value changes from a datasource update (not the user editing the cell).
I could set up events that watch for changes in the datasource, then update the tree, but i wanted to see if i could react to the cells values changing directly.
Is there an event to hook to for this?
_________________
James M
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Mar 03, 2011 9:56 pm    Post subject: Reply with quote

There are only two ways for Virtual Tree to know that a cell's value has changed - and so update itself.

The first is if your data source implements the IBindingList interface. The data source should raise the ListChanged event (with the ListChangeType set to ItemChanged) when an item within the list changes. Usually you do this by the item implementing the IPropertyNotify interface and the list receives change notifications from the contained items using this interface and the raises the ListChanged event.

The second way is for you to call VirtualTree.UpdateRowData() manually. This forces virtual tree to requery the data for the displayed cell widgets and update them.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group