Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
179 views
I'm running into an issue with the ContextMenu where I need to select multiple nodes and use a context menu to apply an action to all those selected nodes. For example: I want to select 3 nodes for deletion, so I select the 3 nodes holding down CTRL, and then I right click on the node and the context menu appears. However, only the node that I right click is selected, the others are no longer selected. I found that when holding CTRL and selecting the first 2 nodes, then right-clicking the 3rd node while holding CTRL, it will select all 3 nodes.

I'm not doing autopostbacks, this is all contained client-side until they select an option (Add,Delete - took out that code here for space)

Javascript:
function ShowContextMenu(node, e) 
        {    
            var menu = null;   
            var item = null;                                 
            var selectedNodes = null
            menu = window["<%= RadMenu1.ClientID %>"]; 
            menu.ContextMenuElementID = node.TreeView.ClientID; 
            treeView = node.TreeView; 
            selectedNodes = treeView.GetSelectedNodes(); 
                         
            var sNodes = "Selected Node Count: " + selectedNodes.length + "\r\n"
            for(i=0;i<selectedNodes.length;i++) 
                sNodes+= selectedNodes[i].Text + ", "
            alert(sNodes); 
             
            if (menu) 
            {    
                menu.Show(e);                 
                e.cancelBubble = true
                if (e.stopPropagation) 
                { 
                    e.stopPropagation(); 
                } 
                e.returnValue = false
                if (e.preventDefault) 
                { 
                    e.preventDefault(); 
                } 
            } 
        } 
 
function OnClick(sender, eventArgs) 
        { 
            var menu = null;                         
            var selectedNodes = null
            menu = window["<%= RadMenu1.ClientID %>"];             
            treeView = window[ menu.ContextMenuElementID ];    
            selectedNodes = treeView.GetSelectedNodes(); 
             
            alert("Nodes Selected: " + selectedNodes.length); 
            return true
        } 
 
 

HTML:
<radT:RadTreeView ID="rtEntitlementPages" OnNodeDrop="rtEntitlementPages_NodeDrop" 
                runat="server" DataTextField="Title" DataFieldID="PageId" DataFieldParentID="ParentPageId"  
                DataValueField="PageId" DragAndDrop="true" DragAndDropBetweenNodes="true" MultipleSelect="true" 
                BeforeClientContextMenu="ShowContextMenu"
            </radT:RadTreeView> 
            <radm:RadMenu ID="RadMenu1" runat="server" IsContext="True" OnClientItemClicking="OnClick" 
                ContextMenuElementID="none" SkinID="TreeContextMenu" OnItemClick="RadMenu1_ItemClick" meta:resourcekey="RadMenu1Resource1"
                <Items> 
                    <radm:RadMenuItem ID="RadMenuItem1" Text="Add" Value="Add" runat="server" meta:resourcekey="RadMenuItemAddResource" /> 
                    <radm:RadMenuItem ID="RadMenuItem3" Text="Delete" Value="Delete" runat="server" meta:resourcekey="RadMenuItemDeleteResource" /> 
                </Items> 
            </radm:RadMenu> 

Ryan Abbott
Top achievements
Rank 1
 answered on 23 Jan 2009
1 answer
96 views

The Tile command works, but id does not respect the boundaries of the restriction zone. I looked through the forum and Google, but found no answers. Any ideas? Here is a sample.

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="RadWindowRestrictionZones.aspx.vb" 
    Inherits="WidgetsDev.RadWindowRestrictionZones" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<html> 
<head runat="server">  
    <title>Untitled Page</title> 
 
    <script language="javascript">  
function Tile()  
{  
    var mngr = GetRadWindowManager();  
    mngr.tile();  
    return true;  
}      
    </script> 
 
</head> 
<body> 
    <form id="form1" runat="server">  
        <table width="500" height="500">  
            <tr> 
                <td id="theZone" style="background-color: lightyellow">  
                </td> 
            </tr> 
        </table> 
        <input type="button" onclick="Tile();" value="Tile" /> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" RestrictionZoneID="theZone" > 
            <Windows> 
                <telerik:RadWindow ID="RadWindow1" runat="server" VisibleOnPageLoad="true">  
                </telerik:RadWindow> 
                <telerik:RadWindow ID="RadWindow2" runat="server" VisibleOnPageLoad="true">  
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager> 
    </form> 
</body> 
</html> 
 
Svetlina Anati
Telerik team
 answered on 23 Jan 2009
1 answer
93 views
Hello.

In old version of rad dock i have rounded border but , now, i install the new version of rad dock for asp.net ajax and the dock are squared..

Why this new version of dock have less skin ? I access the old version of rad dock ( for asp.net and not for asp.net ajax ) and have much more skin to dock.

Is possible use rounded doc in this new version too ?? ( without create new skin )

Thank you and sorry by my english, i´m from Brasil..
Nikolay Raykov
Telerik team
 answered on 23 Jan 2009
1 answer
107 views
hi all,

I've got a meny that consist of root item that is shown in "image only" mode (using ImageUrl and HoveredImageUrl)
and two nested items that I want to show in txt mode without images, but when I tried to do it controls didnt show me nested items at all :(
Is there any restrictions on that? I didnt find such examples in the tutorial...
Thanks.
Leonid
Top achievements
Rank 1
 answered on 23 Jan 2009
3 answers
107 views
Hi Everyone,

I have a grid that contains a large number of the same values in each column. I have implemented cell merging by using the Rowspan and setting cells to invisible. This all works great, except when I come to edit a row using a Web Usercontrol, the usercontrol is positioned incorrectly and appears across to the right because the cell in the left most column for the row I have selected to edit is set to visible=false because it is merged with cells in the rows above and below.

How can I get the usercontrol to position correctly when using cell merging?

Thanking you for your time.
Antony
Dimo
Telerik team
 answered on 23 Jan 2009
1 answer
112 views
Hi Guys,

I have created the article with rad editor about 200 pages which hangs when I click the publish in sharepoint.

Is there any limitation or any idea about his problem?

Thanks
Juan

Stanimir
Telerik team
 answered on 23 Jan 2009
1 answer
131 views
How come when I paste a list from Word, it's imported into the editor using <p> tags?  I want to paste it in as an ordered/unordered list.  Is there a way for me to do this.

Thank You!
Rumen
Telerik team
 answered on 23 Jan 2009
1 answer
102 views
I have a page that has an editor in the middle.  When the page loads, the content of the editor shows in a larger font and then about a half second later resizes to the smaller font that page body has set to.  This does happen in IE.  is there any way to avoid this?
Rumen
Telerik team
 answered on 23 Jan 2009
1 answer
81 views
it just doesn't work. i click on the button 

<

asp:Button ID="ExportToExcel" runat="server" Text="Export" OnClick="ExportToExcel_Click" />

 

 

Protected Sub ExportToExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ExportToExcel.Click

 

RadGrid1.ExportSettings.ExportOnlyData =

True

 

 

 

RadGrid1.ExportSettings.IgnorePaging =

True

 

 

 

RadGrid1.MasterTableView.ExportToExcel()

 

End Sub

 

 

 

<

telerik:RadGrid ID="RadGrid1" runat="server" style="overflow:hidden;"

 

 

 

 

AllowSorting="True" AllowMultiRowSelection="true" Skin="Default" >

 

 

 

 

<MasterTableView Summary="testing"></MasterTableView>

 

 

 

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

 

</telerik:RadGrid>

 

 

the page get reloaded but nothing happen it doesn't popup message asking me to save. can u help? thank you

appdev
Top achievements
Rank 1
 answered on 23 Jan 2009
1 answer
170 views
I want to have a timer on the page (inside an update panel) to just tick away every 5 seconds

When the 5 seconds is up, I'd like to postback to the server, and then when it comes back, set the focus back to the editor control

I've gone through a bunch of the examples in the Demo and help pages, but I can't seem to get it to set the darn focus back to the editor...the only way I've been able to do it is with an input button event.

Ideas?

thanks,
Steve
Svetlina Anati
Telerik team
 answered on 23 Jan 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?