D
David C. Holley
I've been playing around with a TreeView control that I implemented on a
form and came up with what I thought was a nifty trick that I'd share...
In the original implementation, the TreeView control listed out active
invoices and invoices that were paid in the last 45 days. Needless to
say, the list got rather long (not a bad thing), and I wanted to trim it
down. To do that, when the list is buildt, I added a node - ARCHIVE and
setup the node_click event so that when the ARCHIVE node is clicked, the
TreeView control is cleared (nodes.clear) and then repopulated with a
list of old invoices. I also added a 'return' node at the top of the
list of old invoices that does the same thing - it clears the TreeView
control and repopulates is with current invoices.
David H
form and came up with what I thought was a nifty trick that I'd share...
In the original implementation, the TreeView control listed out active
invoices and invoices that were paid in the last 45 days. Needless to
say, the list got rather long (not a bad thing), and I wanted to trim it
down. To do that, when the list is buildt, I added a node - ARCHIVE and
setup the node_click event so that when the ARCHIVE node is clicked, the
TreeView control is cleared (nodes.clear) and then repopulated with a
list of old invoices. I also added a 'return' node at the top of the
list of old invoices that does the same thing - it clears the TreeView
control and repopulates is with current invoices.
David H