<telerik:RadPanelItem Text="ClientDetails" Expanded="True" CssClass="radPanelItem"
DisabledCssClass="radPanelItemDisabled">
<ContentTemplate>
<telerik:RadTreeView ID="clienttree" runat="server" OnNodeExpand="tree_NodeExpand"
EnableDragAndDrop="true"
OnClientNodeExpanded="cleinttree_OnClientNodeExpanded" CssClass="radTreeView">
</telerik:RadTreeView>
</ContentTemplate>
</telerik:RadPanelItem>
Protected Sub tree_NodeExpand(ByVal sender As Object, ByVal e As RadTreeNodeEventArgs)
If showSearchBox Then addSearchNode(e.Node, searchText)
End Sub
Private
Sub addSearchNode(ByVal root As RadTreeNode, ByVal defaultText As String)
Dim node As New RadTreeNode()
node.AllowDrag = False
node.Expanded = True
node.ExpandMode = TreeNodeExpandMode.ClientSide
node.Attributes.Add(
"IsSearch", True.ToString())
root.Nodes.Add(node)
Dim nodeSearchBox As NodeSearchBox = LoadControl("~/Controls/TreeviewControls/NodeSearchBox.ascx")
nodeSearchBox.ParentTreeID = root.TreeView.ClientID
nodeSearchBox.NodeID = root.ClientID
If Not String.IsNullOrEmpty(defaultText) Then nodeSearchBox.Text = defaultText
node.Controls.Add(nodeSearchBox)
End Sub
Kindly Help ,
Thank you in advance
Ramesh.T.
mrramu@yahoo.com
protected void rfeFiles_ItemCommand(object sender, RadFileExplorerEventArgs e){ if (e.Command == "UploadFile") { ArrayList illegalStrings = new ArrayList { "<script", "< script" }; UploadedFileCollection _uploadedFiles = (sender as RadFileExplorer).Upload.UploadedFiles; foreach (UploadedFile file in _uploadedFiles) { StreamReader sr = new StreamReader(file.InputStream); string contents = sr.ReadToEnd(); foreach (string badString in illegalStrings) { if (contents.ToLower().Contains(badString)) { //popup Javascript alert ScriptManager.RegisterStartupScript(Page, Page.GetType(), "KEY", "alert('Cannot upload files with <script> elements..');", true); e.Cancel = true;//cancel the event sr.Close(); break; } } // do I need to do something here? Tried file.InputStream.Position = 0; sr.Close(); } }}
I’ve been pulling out my limited hair over this problem, so I need some help. I’m getting different RadWindow behavior, from the same code, depending on what control was used to invoke that code. In one case, the newly displayed window is modal, in another case it is not modal. But it’s the same code!
Here’s the setup:
The master page contains nothing related to RadWindow.
Top-level page includes the RadWindowManager declaration:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Vista"
style="z-index:20000"
Width="600px" AutoSize="true" ReloadOnShow="true" Modal="true"
VisibleStatusbar="false" Behaviors="Resize, Close, Move" >
</telerik:RadWindowManager>
The top-level page opens the first RadWindow using this client code
var wnd = GetRadWindowManager().open(urlToOpen);
This consistently works fine, gives me a modal window, and dims the entire browser window. This first RadWindow does NOT contain any declarations related to RadWindow. This first RadWindow opens a second RadWindow. I want the second RadWindow to also be modal. The code that I’m using to open the second RadWindow is:
var
oManager = GetRadWindow().GetWindowManager(); <<< GetRadWindow is from the demo
var oWnd;
setTimeout(oWnd = function (p1) {
return oManager.open(p1, null); <<< null or “foo”, no difference
}(urlToOpen), 0);
This code is pretty similar to the demo about opening a window from inside a window. The first RadWindow form calls this code either from an asp.net Button client click event or from a RadComboBox client SelectedIndexChanging event. Really, the same code!
The second RadWindow does not contain any declarations related to RadWindows.
When the button click opens the second RadWindow, it works great. The displayed window is modal, on top, and the browser window is dimmed an additional amount. When the same code is called from the RadComboBox SelectedIndexChanging event, the RadWindow is displayed with correct contents and size, however it is not modal (the first RadWindow is still active), it is initially displayed under the first RadWindow (should be on top), and the browser window is not dimmed an additional amount. The two RadWindows can then be closed in either order.
The only thing that is really different is button vs RadComboBox. Both controls are contained in cells of a DetailsView. Both controls are created dynamically. I’ve checked the intermediate values in the JS code and both get the same window ID and manager ID (using get_id() for both). The second-level RadWindow gets a new ID each time it is displayed, which is expected. This happens in both IE and FF.
This appears to be tied to the RadComboBox, since I get the same non-modal behavior from a different first RadWindow that has a RadComboBox in a RadGrid template column. Both of the first-level RadWindows open the same second RadWindow. The second RadWindow contains a dynamically generated RadGrid but has no knowledge (that I know about) of how it was invoked (both the button and the RadComboBox generate the same url).
Any ideas on how to always get the modal behavior?
Thanks,
DaveL