O
Oren
Hi,
My previous post was accidently sent in the middle of writing it.
So again, I use a treeview control in an aspx page. this control holds files
and folders. I handle its events with client-side javascript for performance
reasons.
I use the following function to handle the onselectedindexchange event of
the treeview:
function MainTreeIndexChanged()
{
var OldIndex = window.event.oldTreeNodeIndex;
var NewIndex = window.event.newTreeNodeIndex;
var TreeNode = event.srcElement.getTreeNode(newIndex);
var id = TreeNode.getAttribute("ID");
alert(id);
}
That way I'm able to get the selected node id.
The problem starts when I need to pass the selected index to the server
side. For example when the user clicks a "file" in the treeview, I need to
pass the selected index value to the server and fetch a matching XML from
the DB. Another example is when a file is selected and I press a "DEL"
button I need to pass the selected index value to the server along with a
deletion command.
I use a single page in that application so no frames are available to me.
I can't use the treeview control in the "autopostback=true" state because of
the project definitions.
What kind of approach or method can I use to overcome that problem?
My previous post was accidently sent in the middle of writing it.
So again, I use a treeview control in an aspx page. this control holds files
and folders. I handle its events with client-side javascript for performance
reasons.
I use the following function to handle the onselectedindexchange event of
the treeview:
function MainTreeIndexChanged()
{
var OldIndex = window.event.oldTreeNodeIndex;
var NewIndex = window.event.newTreeNodeIndex;
var TreeNode = event.srcElement.getTreeNode(newIndex);
var id = TreeNode.getAttribute("ID");
alert(id);
}
That way I'm able to get the selected node id.
The problem starts when I need to pass the selected index to the server
side. For example when the user clicks a "file" in the treeview, I need to
pass the selected index value to the server and fetch a matching XML from
the DB. Another example is when a file is selected and I press a "DEL"
button I need to pass the selected index value to the server along with a
deletion command.
I use a single page in that application so no frames are available to me.
I can't use the treeview control in the "autopostback=true" state because of
the project definitions.
What kind of approach or method can I use to overcome that problem?