or
| <asp:DataList ID="DataList1" runat="server" |
| DataSourceID="sdsRoomSelect" RepeatColumns="7" |
| RepeatDirection="Horizontal"> |
| <ItemTemplate> |
| <br /> |
| <p/> |
| <asp:Button ID="Button1" CommandName="select" runat="server" Text='<%# Eval("Room_No") %>' Width="50px" Height="50px" /> |
| <br /> |
| <br /> |
| </ItemTemplate> |
| </asp:DataList> |
| Protected Sub DataList1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DataList1.ItemCommand |
| If e.CommandName = "select" Then |
| Dim ddl As Button = TryCast(DataList1.FindControl("Button1"), Button) |
| Dim strValue As String = ddl.Text |
| Response.Cookies("roomno").Value = strValue |
| End If |
| End Sub |
| <%@ Page Title="" Language="VB" AutoEventWireup="false" CodeFile="mtr_files.aspx.vb" Inherits="bradford_mtr_mtr_files" %> |
| <html> |
| <head> |
| <script type="text/javascript"> |
| function fileOpen(sender, args) |
| { |
| var wndMng = sender.get_windowManager(); |
| wndMng.set_width(600); //set desired width |
| wndMng.set_height(400); //set desired height |
| wndMng.set_behaviors(Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close); |
| } |
| </script> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| </telerik:RadScriptManager> |
| <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server" Height="205px" |
| Skin="Office2007" VisibleControls="TreeView, Grid, Toolbar, ContextMenus" onclientfileopen="fileOpen"> |
| <Configuration SearchPatterns="*.*"></Configuration> |
| </telerik:RadFileExplorer> |
| </form> |
| </body> |
| </html> |
| Imports System.IO |
| Partial Class bradford_mtr_mtr_files |
| Inherits System.Web.UI.Page |
| Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init |
| Dim heatcode As String = Request.QueryString("mtr_heatcode") |
| Dim folder As String() |
| If IO.Directory.Exists("c:\inetpub\wwwroot\bradford\mtr\mtr_docs\" + heatcode) = False Then |
| folder = New String() {"~/bradford/mtr/mtr_docs/"} |
| 'IO.Directory.CreateDirectory("c:\inetpub\wwwroot\bradford\mtr\mtr_docs\" + heatcode) |
| Else |
| folder = New String() {"~/bradford/mtr/mtr_docs/" + heatcode} |
| End If |
| RadFileExplorer1.Configuration.ViewPaths = folder |
| RadFileExplorer1.Configuration.UploadPaths = folder |
| RadFileExplorer1.Configuration.DeletePaths = folder |
| RadFileExplorer1.Configuration.MaxUploadFileSize = 10485760 |
| End Sub |
| End Class |
I'm able to get around this in the case where I will always have just one root node by adding a dummy node to the tree view on the initial load of the page, then clearing that node prior to adding the actual root node followed by its children. I'm not able to get around it though in the case where I have multiple root nodes, because the number of root nodes depends on some user selections prior to a postback where the nodes are loaded.
I did just upgrade to the AJAX controls from the classic controls, and I was not having this problem with the classic controls.
Thanks,
Jason