Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Binding .NET 2.0 TreeView with custom objects
 

Binding .NET 2.0 TreeView with custom objects


Hello All,

I needed to bind a treeview with my custom dataobjects in such a way that, I can implement MVP pattern.

Assume I bind a treeview with my custom object (not xml) deleting a node should trigger listChanged in the presenter, which holds the dataobject.

Is this possible in .NET 2.0. I am following this approach after reading Josh Smith s MVVM artcile for WPF. I Want to adopt this approach for 2.0 treeview . is this possible?

Regards
Sandeep
SandepKU  Tuesday, August 04, 2009 11:30 AM

There is no easy way to databind treeview, you have to write your code.

There is a good article on codeproject, that may give you right direction .
http://www.codeproject.com/KB/tree/dbTree.aspx

NareshG  Tuesday, August 04, 2009 11:36 AM

There is no easy way to databind treeview, you have to write your code.

There is a good article on codeproject, that may give you right direction .
http://www.codeproject.com/KB/tree/dbTree.aspx

NareshG  Tuesday, August 04, 2009 11:36 AM

You can use google to search for other answers

Custom Search

More Threads

• modifying the contents of datagrid at runtime
• Does it MVP or no?
• Getting value of ComboBox in Datagridview Control
• How to Filter BindingListCollectionView that Made use LINQ To SQL
• Databindings mastered by a textBox...
• Application name does not appear in Windows Task Manager
• A filter with ALL in a combobox ???
• Howto implement Form.IsDirty?
• Disabled DataGridViewComboBoxCell
• Invalid NewIndex in ListChange Event when ListChangedType is ItemDeleted