An addition to the above Post.
When the User right click on a Tree Node, and select an item, the Node is becoming NULL in the event handler method and the same node we are not able to access using the Toolbar too.
Earlier I reported that we can access it from Toolbar. But it is wrong. We are not able to access that Node either from Context Menu or Toolbar.
We changed the code as below and we observed that the Tree is loosing Nodes:
Protected Sub RdTViewPerspective_ContextMenuItemClick(ByVal sender As System.Object, ByVal e As Telerik.Web.UI.RadTreeViewContextMenuEventArgs) Handles RdTViewPerspective.ContextMenuItemClick
Try
'Tree Node Validation:
If e.Node Is Nothing Then
RadAjaxManager1.Alert("Unable to perform the Action! Tree Node is NULL.\nPlease try your request again!\nWe are sorry for any inconvenience this may have caused you.")
Exit Sub
End If
Select Case e.MenuItem.Value.ToUpper()
Case "SAP_INFO"
HideAllPanels()
DisplayGeneralInformation(e.Node)
DisplaySAPInfoPanel(e.Node)
ReSetToolBarButtons(e.Node)
Case Else
'Nothing to do.
End Select
Catch ex As Exception
log.Info(ex.Message.ToString())
Response.Redirect("CustomError.aspx?Msg=" + Server.UrlEncode(ex.Message.ToString()) + "&ErrorSource=" + Server.UrlEncode(ex.Source.Replace(Environment.NewLine, "-----><BR>").ToString()) + "&ErrorStack=" + Server.UrlEncode(ex.StackTrace.ToString()), False)
End Try
End Sub
When the Node becomes NULL, we see the error message populate on the screen and immediately some of the Tree Nodes disapears from the Tree. Means if we are at the six or seventh level in the hierarhcy, the tree looses till 3rd level or 4th level.
Why is it so? Can you help us?
See the attached screen shots!!
Thanks
Sri K Gamini.