November 08, 2005

Recursive Data Bound TreeView

Follow-up to Data Bound Tree View from codeMonkey.Weblog();

I decided that my data bound treeview control should support recursive data structures. For example an OPML file consists of a set of "outline" elements and each outline can have child outlines inside. Therefore I've added a method to the control called "AddRecursiveLevel". So the tree will then recurse over the data structure until all leaves have been reached. The recursive level cannot have a CurrencyManager to update because that would require changing the data source of it (which can't be done easily). It does not make much sense to have an idea of "currency" when dealing with arbitrary depth tree data structure. The solution is to add a SelectedDataItem property to the control. Code that uses the treeview control can data bind that property to the datasource property of a BindingSource component. Other UI controls can then bind to that BindingSource. That way the user can drill down to a node in the tree view and then edit data using controls bound to the selected item.

There is still a fair bit of work to do in terms of enforcing constraints and documentation. I'm very busy getting ready for my trip to the USA on Thursday. Hopefully when I return I will have some more free time to work on the control.

- No comments Not publicly viewable

Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

Google Ads

Search this blog

Most recent comments

  • I scratched my eye while i was holding some kind of plastic packaging.. Anyways the corner of the pl… by Ercan on this entry
  • About a year ago my contacts that i was wearing, i guess were fautly, because shortly after they wer… by Jon on this entry
  • I got shower gel in my eye 4 and a half days ago, and becasue i rubbed my eyes a lot, i have scratch… by Chris on this entry
  • This website may help–health/tc/Eye–Injuries–Home–Treatment by S on this entry
  • I somehow got dirt, or debris in my eye. The terrible pain sent me in a tailspin. I was afraid of sa… by Bobbi on this entry


November 2005

Mo Tu We Th Fr Sa Su
Oct |  Today  | Dec
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30            


Blog archive

Not signed in
Sign in

Powered by BlogBuilder