You need to override the events and point them to JS methods.
In the aspx page add this JS method, assuming your treeview object is called treeView.
<script language="javascript">
function myFunc()
{
}
</script>
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
function myFunc()
{
}
Then in Page_Load add the following:
treeView.Attributes.Add("onexpand","javascript:myFunc()");
treeView.Attributes.Add("oncollapse","javascript:myFunc()");
This should let you expand and collapse client side with no round trips.