S
Shawn
Hi.
I'm working with the TreeView control in my ASP.NET 1.1 application. I have
a problem I haven't been able to figure out. When I click on a node (not
expand), whether it's a parent node, a child node or a leaf node then a
DataGrid is populated based on the node's ID property. If I expand a node
then the DataGrid is not populated. This works fine. The problem is that
this doesn't work if I collapse the tree. If I collapse the tree then the
collapsed node is being selected (if the currently selected node is a
subnode of the node being collapsed) and the SelectedNodeChanged event is
fired. This causes the DataGrid to populate again. I've been thinking of a
way to avoid this, but I'm all out of ideas.
I thought of setting a flag when the collapse event was fired and then check
for that flag when the SelectedNodeChanged event fired to avoid populating
the DataGrid again. Problem is that the SelectedNodeChanged event fires
before the collapse event.
So, if there are any bright minds out there who can tell me what to do I
would be very grateful.
Thanks,
Shawn
I'm working with the TreeView control in my ASP.NET 1.1 application. I have
a problem I haven't been able to figure out. When I click on a node (not
expand), whether it's a parent node, a child node or a leaf node then a
DataGrid is populated based on the node's ID property. If I expand a node
then the DataGrid is not populated. This works fine. The problem is that
this doesn't work if I collapse the tree. If I collapse the tree then the
collapsed node is being selected (if the currently selected node is a
subnode of the node being collapsed) and the SelectedNodeChanged event is
fired. This causes the DataGrid to populate again. I've been thinking of a
way to avoid this, but I'm all out of ideas.
I thought of setting a flag when the collapse event was fired and then check
for that flag when the SelectedNodeChanged event fired to avoid populating
the DataGrid again. Problem is that the SelectedNodeChanged event fires
before the collapse event.
So, if there are any bright minds out there who can tell me what to do I
would be very grateful.
Thanks,
Shawn