Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
112 views
Hi
I have a Req where i have two nodes in treeview one is the folder Node and Another one is the Report Node.
Am Showing two Seperate Context menu for that Diff Node.
For inst if I click any Folder Node ill get Context menu as follows 1)Create Folder 2)Copy Policies.And Then if i click the Report Node ill get only one Context Menu as 1)Copy Policies.

I have Tried To use the Web Service and  i  called a Web Service  using OnClientContextMenuShowing event.
But for Each and Every click i bind the Context Menu from WebService and Then if i click any other node the Previous Context Menu Gets Appended to the Present Node.Which i feel Errorneous .
You can find the Picturistique info Below.
Pic1
pic2

Here is the Code Below
 <telerik:RadScriptBlock runat="Server" ID="RadScriptBlock1">
            <script type="text/javascript">

function onClientContextMenuShowing(sender, args) {
                    debugger;
                    var treeNode = args.get_node();
                    var type=treeNode._textElement.title;
                    treeNode.set_selected(true);
                    var menu = args.get_menu();
                  
                   
                    setMenuItemsState(args.get_menu(), treeNode);
                }


function setMenuItemsState(menuItems, treeNode) {

                   
                 
                    if (treeNode._textElement.title == 'Folder') {

                        var count = menuItems.get_items().get_count();
                        if (menuItems.get_items().get_count() > 0)
                            return;
                       
                        WebService.LoadFolderitems(null, function(result) {

                            for (var i = 0; i < result.length; i++) {
                                var item = new Telerik.Web.UI.RadMenuItem();
                                item.set_text(result[i].Text);
                               
                                menuItems.get_items().add(item);
                               
                            }
                        });
                     
                    }
                    else {
                        if (menuItems.get_items().get_count() > 0)
                            return;
                        WebService.LoadReportitems(null, function(result) {

                                                        for (var i = 0; i < result.length; i++) {
                                                            var item = new Telerik.Web.UI.RadMenuItem();
                                                            item.set_text(result[i].Text);
                                                          
                                                            menuItems.get_items().add(item);
                                                        }
                           
                        });
                    }

 

                   
                   
                   
                }

</script>
            </telerik:RadScriptBlock>



<telerik:RadTreeView ID="Reportview" runat="server" OnNodeExpand="RadTreeview1_NodeExpand"
                                                    OnClientNodeClicked="nodeClicked" OnClientContextMenuItemClicking="onClientContextMenuItemClicking"
                                                    OnClientContextMenuShowing="onClientContextMenuShowing">
                                                    <ContextMenus>
                                                        <telerik:RadTreeViewContextMenu Skin="Outlook" ID="FolderContextMenu" runat="server">
                                                            <WebServiceSettings Method="LoadFolderitems" Path="WebService.asmx" />
                                                             <WebServiceSettings Method="LoadReportitems" Path="WebService.asmx" />
                                                        </telerik:RadTreeViewContextMenu>
                                                    </ContextMenus>
                                                    <Nodes>
                                                        <telerik:RadTreeNode runat="server" Expanded="True" ExpandMode="ServerSideCallBack"
                                                            Text="Root" Value="/" ImageUrl="~/images/12.gif">
                                                        </telerik:RadTreeNode>
                                                    </Nodes>
                                                </telerik:RadTreeView>


balaji
Top achievements
Rank 1
 asked on 13 Aug 2009
8 answers
234 views
When I use a radformdecorator on a form (2 forms), when I get to the button, it doesn't postback with the spacebar.

Does it for anyone else? How can I fix this?

I'm using Q3 2008 asp.net ajax, hotfix version: 2008,3,1126,35

thanks.

Moon
Martin
Telerik team
 answered on 13 Aug 2009
2 answers
71 views
Hi
We are currently using asp Update panels in usercontrols on a tabstrip and we thougt that this would ensure us that only the current tab:s usercontrol/ where sent to server for processing. But during a performance analysis we found out that all usercontrols on the page where sent to the server.
Is this the behaviour of the RadAjaxPanel as well?
I have done some reading on the products pages and on the forum but haven't found any info on this subject.

Best regards
Sven Hasselblad
Sven Hasselblad
Top achievements
Rank 1
 answered on 13 Aug 2009
6 answers
146 views
After few hours of troubleshooting, figured out that OnClientNodeEdited is too early for removing node with .get_nodes().remove(node).
The code is as follows:
ASPX:
<%@ Page Language="VB" AutoEventWireup="false"   
CodeFile="tempPage.aspx.vb" Inherits="tempPage" %> 
 
<%@ Register Assembly="Telerik.Web.UI"   
Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head> <title>Test Page</title></head>  
<body> 
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
    <script type="text/javascript">  
       
        function FinishEditing(sender, eventArgs)  
            {  
                var node = eventArgs.get_node();  
                var nodenodeParent=node.get_parent();  
                nodeParent.get_nodes().remove(node);  
            }  
 
        function FolderContextClicked(sender, eventArgs)  
            {  
                var node=eventArgs.get_node();  
                node.startEdit()  
            }  
              
    </script> 
</telerik:RadCodeBlock> 
<form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
 <telerik:RadTreeView ID="FolderView" runat="server"   
    AllowNodeEditing="true"   
    OnClientNodeEdited="FinishEditing" 
    MultipleSelect="false" ShowLineImages="true"   
    OnClientContextMenuItemClicked="FolderContextClicked"   
    Skin="Outlook">  
    <CollapseAnimation Duration="100" Type="OutQuint" /> 
    <ExpandAnimation Duration="100" /> 
    <ContextMenus> 
    <telerik:RadTreeViewContextMenu   
     ID="FolderContextMenuForJunk" Skin="Outlook">  
    <Items> 
        <telerik:RadMenuItem Text="Edit"   
         Value="Edit"></telerik:RadMenuItem> 
    </Items> 
    </telerik:RadTreeViewContextMenu> 
    </ContextMenus> 
</telerik:RadTreeView> 
</form> 
</body> 
</html> 
 

VB:
Imports System.Data.SqlClient  
Imports System.Data  
Partial Class tempPage  
    Inherits System.Web.UI.Page  
     
 
    Protected Sub Page_Load(ByVal sender As Object, _  
      ByVal e As System.EventArgs) Handles Me.Load  
 
  Dim objNode As New Telerik.Web.UI.RadTreeNode("One", "One")  
  FolderView.Nodes.Add(objNode)  
  objNode = New Telerik.Web.UI.RadTreeNode("Two", "Two")  
  FolderView.Nodes.Add(objNode)  
  objNode = New Telerik.Web.UI.RadTreeNode("Three", "Three")  
  FolderView.Nodes.Add(objNode)  
 
    End Sub  
End Class  
 

If something is called "OnClientNodeEdited " one expects that all work is finished and no problem for remove should exists. But, it is not that way. 
Partial fix is replacing remove line with:
window.setTimeout(function() {   
nodeParent.get_nodes().remove(node);}, 200); 

But propper fix would be altering TreeView class and making sure when this event fires up, actions like remove are possible.

Alex
 
Cole
Top achievements
Rank 1
 answered on 13 Aug 2009
1 answer
150 views
I think it is great that Telerik provides the skins for download, but I'm not sure what I'm suppose to do with a PSD file other than view it in picture viewer. Am I missing something or is that all that your suppose to be able to do is view them as a picture? For instance, if I want one image out of the PSD am I suppose to do a screen capture or something?
rh
Top achievements
Rank 1
 answered on 13 Aug 2009
14 answers
289 views
Hi, based on the screen cap below, is there a way to make my word wrap not to go under the icon?

http://www.ximnet.com.my/aspnet35/images/treeview_wrap.png
HSLaw
Top achievements
Rank 1
 answered on 13 Aug 2009
0 answers
102 views
As far as I know, RAD Upload can integrate with RAD Grid. Are there any limitations on uploading MS Word Document or PDF file using this control? It seems that using RADUpload in an Ajaxfield Grid only can support image file upload. 
Keen Ma
Top achievements
Rank 1
 asked on 13 Aug 2009
1 answer
116 views
Hello.

I had success putting a list of available fonts into the the Font Name Selection dropdown like follows:
<fontNames>
   <item name="Verdana" default="true" />
   <item name="Arial" />
   <item name="Arial Narrow" />
   <item name="Arial Black" />
 </fontNames>

But the issue is that I need to set the "Verdana" font as default on the dropdown, right now it appears like "Times New Roman". How can I do this? Where that value comes from? Is there some value to be ste in the ToolsFile.xml? or inside the ConfigFile?

This is what I used so far, but did not work:

Version used is 5.5.0.0.

in the ConfigFile.xml, I put:
<property name="OnClientLoad">ChangeFontOnDropdown</property>  

then in he MOSSEditorTools.js file, I added:

function ChangeFontOnDropdown(editor)
{
 alert("Debugging to set the font ToolPart Bold");  
    var oFontTool = new Object();
    oFontTool.GetSelectedValue = function() { return "Georgia"; }
    editor.fire("FontName", oFontTool);
}

First of all I was using 'editor.Fire' (note the F upper case on Fire), but it sent an error. So, I changed it to be 'fire' (note the f lower case on fire), but it still won't work.

Any help is highly appreciated.

Thank you.
Jorge Merino
Top achievements
Rank 1
 answered on 12 Aug 2009
1 answer
66 views
Hi,

I read http://www.telerik.com/community/forums/aspnet-ajax/grid/gridnumericcolumn-cant-set-format.aspx#895768 and was finally able to get my numeric column to format correctly (Side note: attaching via codebehind does seem like a hack). I am happy that the columns are formatting correctly for both view and edit modes. However, they don't seem to be following the formatting rules for the filter numeric text box in the column header. Is there a seperate property I need to set or something?

Thanks,
Kent

<telerik:GridNumericColumnEditor ID="employeeIdColumnEditor" runat="server">  
    <NumericTextBox> 
        <NumberFormat DecimalDigits="0" GroupSeparator="" /> 
    </NumericTextBox> 
</telerik:GridNumericColumnEditor> 

            <tekerik:GridNumericColumn DataField="MgrEmpID" ColumnEditorID="employeeIdColumnEditor" HeaderText="Employee ID" SortExpression="MgrEmpID" UniqueName="MgrEmpID" DataType="System.Int32">  
            </tekerik:GridNumericColumn> 
Schlurk
Top achievements
Rank 2
 answered on 12 Aug 2009
3 answers
240 views
Dear Telerik,

Currently by adding style="white-space:normal" to a treeview or node i am able to wrap the text but not as desired. It wraps with no indentation at all.

Example
 Parent node text 1111111111111
 1111111111111111

        Child node 11111111111111
 1111111111111111

        Child node 22222222222222
 222222222222222222222222222

What i require is when node text is wrapped to have indentation so the user can still see the links and its clear and visually pleasing as
 Parent node text 1111111111111
 1111111111111111

        Child node 11111111111111
        1111111111111111

        Child node 22222222222222
        22222222222222222222222
        2222


I am using RadControls_Q3_2007_SP1_dev version currently. Can this be done if so how?

Regards
Chathuranga

Moon
Top achievements
Rank 2
 answered on 12 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?