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 

FindRow problems

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



Joined: 21 Jun 2005
Posts: 89
Location: Switzerland

PostPosted: Wed Jul 27, 2005 1:54 pm    Post subject: FindRow problems Reply with quote

Hi

I have again problems with FindRow Embarassed
I defined a DataSet with two Tabels an a Relation between this two Tables.

Virtual Tree is configured with two Data Row Binding. The Parent / Child properties of each binding is set correctly.

When I call FindRow(). The Debug Window shows the following Message:

Error: Unable to find path
Path: Infralution.Controls.VirtualTree.Row
Ensure that you have:
A. Set the Parent properties appropriately in the Tree RowBindings; or
B. Handled the GetItemParent event and set the Parent property; or
C. Overridden the GetParentForItem and returned the correct parent object.

Can you look at my Sample App what's wrong?

Thanks
Giuseppe
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Jul 27, 2005 11:22 pm    Post subject: Reply with quote

Thanks for the sample project - it made diagnosis easy. Actually your FindRow call was fine and succeeded. The problem was that you were using the SelectedItem property (which deals with the domain object not rows) instead of the SelectedRow property. The SelectedItem property does the FindRow for you so your code should look like

Code:

DataRowView mySearchItem = DataRowRowBinding.GetDataRowView(ds.Companies.Select("Name = 'BMW'")[0]);
tree.SelectedRow = tree.FindRow(mySearchItem);


or

Code:

DataRowView mySearchItem = DataRowRowBinding.GetDataRowView(ds.Companies.Select("Name = 'BMW'")[0]);
tree.SelectedItem = mySearchItem;

_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
flc.net



Joined: 21 Jun 2005
Posts: 89
Location: Switzerland

PostPosted: Thu Jul 28, 2005 6:54 am    Post subject: Reply with quote

*lol* im so stupid Wink


thanks again for your great support.
Giuseppe
Back to top
View user's profile Send private message
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