Have problem to load my TreeView using "Public Sub buildTree()" and InitialPageLoad...
What can I possibly do wrong ....
What can I possibly do wrong ....
<telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="PanelLoad" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
<ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
</telerik:RadAjaxManager>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function RequestStart(sender, eventArgs) {
$get("<%=modalDiv.ClientID %>").style.display = "block";
}
function ResponseEnd(sender, eventArgs) {
$get("<%=modalDiv.ClientID %>").style.display = "none";
}
function pageLoad(sender, eventArgs) {
if (!eventArgs.get_isPartialLoad()) {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad");
}
}
</script>
</telerik:RadCodeBlock>
<asp:Panel ID="PanelLoad" Visible="False" Style="padding-left: 6px; padding-top:6px;" runat="server">
My TreeView databind using the "Public Sub buildTree()"
</asp:Panel>
<div id="modalDiv" style="position: absolute; top: 40px; left: 0px; height: 3000px; width: 100%; z-index: 100; background: gray; display: none; opacity: 0.3; filter: alpha(opacity=100);" runat="server" />
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) If e.Argument = "InitialPageLoad" Then 'System.Threading.Thread.Sleep(3000) PanelLoad.Visible = True End IfEnd SubProtected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then buildTree() End IfEnd Sub'....................................Public Sub buildTree() Dim MyConnection As New SqlConnection(System.Configuration.................. Dim MyDataAdapter As New SqlDataAdapter("select NodeId, ParentNodeId................ Dim DS As New DataSet() MyDataAdapter.Fill(DS) DS.Relations.Add("NodeRelation",...........