G
Guest
I offer this observation for what it's worth.
I have long looked for a method of displaying a list and providing a
checkbox alongside each row such that a user can select zero to many items
from the list. To date this has always involved building a new work table to
which the list is bound; the table includes an extra column for the checkbox.
Then when the user is finished I open the table and read through the records
taking whatever action is appropriate.
Then the other day it struck me that I can use the TreeView control for the
same purpose. If I enable the checkbox feature, disable the hierarchy lines
and ignore the parent-child functionality I achieve my requirements albeit
that I don't have as much control over the format, etc. When the user has
finished I can read through the nodes and determine which ones have been
selected. I can store a foreign key or object reference in the node tag
property.
Yes, I know I can achieve the same thing with a multi select list box but
the TreeView adds a third way of handling this requirement.
Rod
I have long looked for a method of displaying a list and providing a
checkbox alongside each row such that a user can select zero to many items
from the list. To date this has always involved building a new work table to
which the list is bound; the table includes an extra column for the checkbox.
Then when the user is finished I open the table and read through the records
taking whatever action is appropriate.
Then the other day it struck me that I can use the TreeView control for the
same purpose. If I enable the checkbox feature, disable the hierarchy lines
and ignore the parent-child functionality I achieve my requirements albeit
that I don't have as much control over the format, etc. When the user has
finished I can read through the nodes and determine which ones have been
selected. I can store a foreign key or object reference in the node tag
property.
Yes, I know I can achieve the same thing with a multi select list box but
the TreeView adds a third way of handling this requirement.
Rod