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 

Programatic binding of columns

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





PostPosted: Thu Dec 08, 2005 5:26 pm    Post subject: Programatic binding of columns Reply with quote

I am new to vb.net and struggling with a task. I am desparate for help with databinding for a treeview with details, I am struggling to work out how to do this.

Because of the way the data is set up I have to programatically create the treeview but I can't work out how to bind the columns holding the details.

I have used the Programmatic Binding Sample as the basis for the treeview part and added icons to flag certain conditions.

I know what I would like to display and I have added the columns in the Treeview list at design time. However I cannot work out how to bind the details exposed by my code to the columns.

I do not understand the options for binding at design time and am not sure if this might be the easy way to do this if I knew how.

please can someone help.
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Dec 09, 2005 11:09 am    Post subject: Reply with quote

Thanks for the extra information you emailed regarding this. All you need to do is to add some extra code to the _virtualTree_GetCellData event handler method to return the data to display in the other columns eg

Code:

If e.Column Is Me.colMain Then
   e.CellData.Value = Project.Name
else if e.Column is Me.colVariant Then
   e.CellData.Value = Project.strvariant
else if e.Column is Me.colTitle Then
   e.CellData.Value = Project.issue
' etc...
End If


Actually from the code you sent it looks like it would be fairly easy to use standard ObjectBinding instead of doing this programmatically. The main advantage of this is that it relieves you of the tedium of writing code like the above. You could maybe consider this at a later stage when you have more time.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Elephant
Guest





PostPosted: Fri Dec 09, 2005 12:38 pm    Post subject: Programatically adding Columns Reply with quote

Thank you I can't believe it was so simple Laughing .
I will look into the object binding when I get a chance as I think it will be simpler but this gets me going.

Thank you for an excellent tool Very Happy .
Back to top
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